Closed mangecoeur closed 2 years ago
P.S. I think this issue is linked to these lines in core/filterMenu.ts
protected _evtMouseDown(event: MouseEvent) {
// Close the menu if a click is detected anywhere else
if (!ElementExt.hitTest(this.node, event.clientX, event.clientY)) {
this.close();
}
}
The menu that appears for the 'select' looks like a native menu rather than one drawn by widget system (has different styling than the ipywidgets dropdown select). So I suspect that when I click on it, the click is doesn't register as being in the 'hitbox' (either because it's x,y is outside the region or is null or something) and this closes the menu.
P.P.S This seems to be specific to Firefox, using a Chromium-based browser (Brave in this case) doesn't have the issue. On the other hand, in Safari datagrid doesn't work at all with the error Unhandled Promise Rejection: Error: Module ipydatagrid, semver range ^1.1.1 is not registered as a widget module 272.2a8425db7209008188fc.js:1:2113
@mangecoeur Many thanks for filing this issue! I am able to reproduce this on Firefox (Chrome works fine, as you noted). Will investigate.
Taking a look
I have a datagrid in a Tab widget. When i click Filter -> Filter by condition and I try to select a condition type (less than, greater than, in between) with the mouse, the whole menu disappears on click (so I can't enter the values). If I use the arrow keys or the mouse to highlight the desired condition and press enter, it works fine - it seems that the mouse click event is causing the whole menu to be hidden.
Using Firefox 90.0.0.2 on macOS 11.4, Jupyterlab 3.1.2