`Menu.open()` should have an option to align `x` and `y` to the top right of the menu.
Opened this issue · 1 comments
Problem
I am trying to add a button to an extension that opens a menu. The button is on the far right side of the window, so the menu is automatically shifting to fit into the window. If I use the forceX
option a portion of the menu will be out of the window and not viewable.
See the thread here for more context.
Proposed Solution
I propose adding a parameter to Menu.IOpenOptions
to specify how the menu would relate to x
and y
. It could be something like align
with the possible options "right"
and "left"
. "left"
would be default and it would align the top-left of the menu to x
and y
. "right"
would align the top-right of the menu to x
and y
.
Thanks for the suggestion @andrewfulton9
Minor comment on the proposed solution: although accessibility concepts are not well integrated in existing Lumino code. For new proposals like this one, we should consider it more thoughtfully. Therefore, I would suggest having a default matching the language direction rather than left
if possible.