Review main Merged

67510[BUGFIX] Properly position ContextMenu again

Benni Mack CR +2 V +2 Easy +12 −12 updated 02/02/21, 12:24

Commit message

With #89496 the ContextMenu got keyboard support
added. However, the underlying code does still
use only a click event to trigger the ContextMenu,
which is now also manually triggered for keypress
events. It was therefore not possible to differ
between the three possible ways, the ContextMenu
can be used:

1. Mouse click only
2. Mixed
2.1 Click on ContextMenu and navigate via keyboard
2.2 Access ContextMenu via keyboard and navigate via click
3. Keyboard only

Therefore, we now check the mouse position. If it's NULL,
the ContextMenu was openend via keyboard. Furthermore, we
use a boolean flag, which helps the getPosition method to
determine the correct position in mixed mode. Using mouse
click will now behave like before. Using the keyboard will
now always use the boundingRect for positioning.

Review

  • Code review CR +2

    Imported before Forger kept the single votes, the next import adds them.

  • Verified V +2

    Imported before Forger kept the single votes, the next import adds them.

Issues 1

Files 2