Skip to content

Commit

Permalink
maybe fix #5228 again
Browse files Browse the repository at this point in the history
  • Loading branch information
williamstein committed Apr 12, 2021
1 parent e007cc7 commit 3405032
Showing 1 changed file with 13 additions and 7 deletions.
20 changes: 13 additions & 7 deletions src/smc-webapp/jupyter/output-messages/widget.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -450,13 +450,19 @@ export class Widget0 extends Component<WidgetProps, WidgetState> {
// Yeah, that is just insane... except that it seems
// to work fine.
// See https://github.com/sagemathinc/cocalc/issues/5228

// reverting 4dfb08af223897872e8e3fb38eef0a6658a9277d because it breaks sliders
if (false) {
const elt = ReactDOM.findDOMNode(this.refs.reactBox);
const container = $(elt);
const p = container.children().children().remove();
container.prepend(p);
// and https://github.com/sagemathinc/cocalc/pull/5273

const elt = ReactDOM.findDOMNode(this.refs.reactBox);
const container = $(elt);
const children = container.children().children();
for (const child of children) {
// Don't mess with sliders, since if there are multiple
// copies of the same one created at different times, then
// phosphor redoes them in a way that breaks them. Fortunately,
// we don't need to mess with them anyways.
if (child.className.indexOf("widget-slider") != -1) continue;
const a = $(child);
a.parent().replaceWith(a);
}
}, 1);

Expand Down

0 comments on commit 3405032

Please sign in to comment.