Graphite icon indicating copy to clipboard operation
Graphite copied to clipboard

Make floating menus not switch to nearby widgets on hover except when they are sibling widgets

Open Keavon opened this issue 3 years ago • 1 comments

Currently, if you stray your mouse within 100px (before the floating menu disappears), and there is another widget which spawns a floating menu, it is designed to switch to that floating menu. This is by design, inspired by Blender, and is useful for things like the window menu bar (File, Edit, ..., Help) and neighboring dropdown menus in an options bar, for example.

But it should only happen when things are actually neighbors. This means their input widget is a sibling within the same container div. We need to check if that's the case, and only allow a transfer to the other widget in that circumstance. Perhaps it should even be opt-in by applying a data-allow-floating-menu-transfer attribute to the parent div.

Some examples of places we don't want this to happen, where it's happening right now: the primary/secondary color picker, rows in the Properties panel, between the tool options bar and the window menu bar, and others.

Keavon avatar Apr 21 '22 22:04 Keavon

If I recall correctly, I started working on building this and there may be some partially-implemented code in place for it. Feel free to adapt or remove that. I think there is, for example, already a data- attribute based on this idea.

Keavon avatar Apr 21 '22 22:04 Keavon