TreeTable and macOS bug: CTRL+click popup closes right away
Hi,
I have an issue with Treetable (com.intellij.ui.treeStructure.treetable). I have an right-click action added with
PopupHandler.installPopupHandler
which works fine except for macOS. On a mac, normal right click works, but CTRL+click opens and closes the popup immediately. I traced the culprit to the custom
public boolean editCellAt(int row, int column, EventObject e)
in TreeTable, which I'm guessing produces a double event. This isn't a problem for us since our TreeTable is not editable, but I'm not sure whether I should report this as a bug or am I just using TreeTable wrong?
Please sign in to leave a comment.
Thank you! Seems it is an issue of TreeTable that should be fixed.
Thanks for the quick reply! In the meantime we just added an empty editCellAt method override as a workaround, that fixes the issue for us.
Is it only reproducible when an editable cell is a tree cell?
Yes, the table part works fine. So in a two-column setup, the left-one shows the behaviour, right one doesn't.
I still cannot reproduce the issue with closing a popup, but I found another problem:
When you tap by 2 fingers, Java receives "Mouse Button 2 is pressed" with a popup trigger, but when you press Ctrl and tap by 1 finger, Java receives "Mouse Button 1 is pressed with Ctrl" with a popup trigger. The first event is ignored by BasicTableUI, but the second one - not. See
So, Ctrl+Click shows a combobox popup and a custom popup both.
Interesting. I can try an create a minimal test case, but it'll have to wait a bit.