Focus issues with ContextMenu in Chrome browser [message #1858003] |
Fri, 10 March 2023 08:51  |
Eclipse User |
|
|
|
Hi,
I noticed the following behavior in our application. It only happens in the Chrome (and possibly Edge) browser. Firefox does not show that behavior.
We show a custom ContextMenu in response to the right mouse button click on a text widget. That ContextMenu contains a "Select All" option, which calls Text.selectAll().
When that item is triggered using the keyboard, everything works fine. The selection is applied and the focus remains in the widget.
Clicking on the menu item with the mouse will also apply the selection in the field, but in addition the focus moves to another div or the document body.
At that point the selection in the no longer active text field will not be visible.
Even worse: That focus change is not reported to the Java framework and any attempt to reset the focus to that field from Java (I tried forceFocus() and setFocus()) will be ignored.
Is this a known issue?
Can you think of a fix on the Javascript side?
Thanks and kind regards
Gunnar
|
|
|
|
Powered by
FUDForum. Page generated in 0.03513 seconds