This is an edge case occurring when changing Input Mode while the Scroll Box is being dragged. When the Input Mode switches to Game Only, further drag actions are no longer possible. However, because SScrollBar::bDraggingThumb remains set to True, the style does not revert from the Dragged Thumb Image state.
Workaround:
Consider using the following code to force a MouseUp event broadcast when calling Set Input Mode Game Only:
void SimulateMouseButtonUp() { FSlateApplication& SlateApp = FSlateApplication::Get(); FPointerEvent MouseUpEvent( 0, SlateApp.CursorPointerIndex, SlateApp.GetCursorPos(), SlateApp.GetLastCursorPos(), SlateApp.GetPressedMouseButtons(), EKeys::LeftMouseButton, 0, SlateApp.GetPlatformApplication()->GetModifierKeys() ); SlateApp.ProcessMouseButtonUpEvent(MouseUpEvent); }
Expected Result: After Set Input Mode Game Only is executed, the player loses interaction with the UI, and the Scroll Box should revert to its default state.
Actual Result: The Scroll Box remains in the "dragged" state even after releasing the mouse, with no response.
The repro project is attached. Run the game and hold the vertical scrollbar for 3 seconds. A video is also provided.
There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-229252 in the post.
0 |
Component | UE - Editor - UI Systems - Slate |
---|---|
Affects Versions | 5.4 |
Target Fix | 5.6 |
Created | Oct 31, 2024 |
---|---|
Updated | Nov 20, 2024 |