Closed rodneyboyd closed 1 year ago
I updated TkinterWeb and fixed the problem. In version 3.18.5, I introduced some code that resets the widget's state when the mouse leaves it, so that, for instance, hover flags don't remain on an element after opening a popup. I just added some code that does the opposite when the mouse enters the widget.
I would recommend saving the information about the currently hovered element before opening the menu, as get_currently_hovered_node_attribute
, get_currently_hovered_node_tag
, and get_currently_hovered_node_text
get the node that is under the mouse and not the one clicked on. This means that if the user presses "Show hover" on a part of the popup that is outside of the link's bounds, your code will show the user as having not clicked on a link.
Hope this helps!
It's working now. Thanks for the update and for the suggestion.
No worries!
Code:
Sample:
In version 3.18.2, clicking in the
h2
element and invokingshow_current_hover
via the popup menu or via the Ctrl+D keyboard accelerator both print the expected data. In versions 3.18.5 and later, only using the accelerator prints the expected data.Thanks!