mirror of
https://github.com/ocornut/imgui.git
synced 2026-11-10 19:03:30 +00:00
DragFloat loses focus while dragging in submenu, if mouse goes over parent menu #6869
Labels
No labels
accidentally closed
android
backends
bug
building
clipper
coloredit
color spaces
cplusplus
data types
demo
disabled
doc
docking
dpi
drag drop
drawing/drawlist
dropped
dx12
enhancement
focus
font/text
gallery
help wanted
idle/power saving
ime
in progress
inputs
inputtext
internals
label/id and id stack
language bindings
layout
linux/bsd
menus
multi-contexts
multi-threading
multi-viewports
nav
news/info
opengl
optimization
osx/ios
overlap
plot/graph
popups
question
scrolling
selection
settings
sliders/drags
style
tables/columns
tabs
test wanted
tools
tooltips
tree
tricks & tips
useful widgets
vulkan
web
window pos/depth
window sizing
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
ocornut/imgui#6869
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Version: 1.90 wip (18993)
Branch: master
Back-end/Renderer/Compiler/OS
Renderer: All
OS: only tested on Windows 10
My Issue/Question:
When I change the value of a DragFloat in a submenu, by dragging the mouse, the slider loses focus when mouse goes over the parent menu, but not when going outside the submenu onto the window.
This also does not happen if the DragFloat is on a window.
I ran the examples, and I can see the issue in the "Dear ImGui Demo" window, in Menu > Options > Value slider.
Screenshots/Video
https://github.com/ocornut/imgui/assets/142992139/2e78d982-6bea-465b-a3ee-3e82e318fabd
Standalone, minimal, complete and verifiable example:
Running the examples I built from master.
Confirmed as caused by
0dec430. I'm surprised it hasn't been reported earlier.The cross-menu hovering system has been one of my nemesis for a long time (spent many days of work trying to find a design that made sense and validating with tests), but it turns out that, luckily this specific bug is more due to an overlooked thing rather than a bigger design flaw.
Effectively an Active ID would prevent hovering and the code prior to
0dec430did benefit from that.Pushed fix
456aa3b+ regression test:ocornut/imgui_test_engine@68d9f57479Thank you for reporting!