Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Editor: Colour picker's hex LineEdit input's tooltip steals focus #79500

Closed
snailrhymer opened this issue Jul 15, 2023 · 11 comments · Fixed by #92843
Closed

Editor: Colour picker's hex LineEdit input's tooltip steals focus #79500

snailrhymer opened this issue Jul 15, 2023 · 11 comments · Fixed by #92843

Comments

@snailrhymer
Copy link
Contributor

snailrhymer commented Jul 15, 2023


Bugsquad note: This issue has been confirmed several times already. No need to confirm it further.


Godot version

v4.1.stable.official [9704596]

System information

Godot v4.1.stable - Windows 10.0.19045 - Vulkan (Compatibility) - NVIDIA GeForce GTX 1660 Ti (NVIDIA; 31.0.15.1640) - AMD Ryzen 7 4800H with Radeon Graphics (16 Threads)

Issue description

2023-07-15.14-10-41.mp4

When you click on or mouseover the hex input field in the colour picker, a tooltip appears that takes focus away from the text field, stopping you inputting anything. This is very easily resolved by clicking again, but it's still a minor inconvenience when inputting many colour codes.

This can also occur after a brief delay, so it's possible to have started typing in the code before focus is lost:

2023-07-15.14-16-13.mp4

Steps to reproduce

In the colour picker (e.g. for a CanvasItem's Modulate), click in the hex input field and try to type.

Minimal reproduction project

N/A

@snailrhymer snailrhymer changed the title Editor: Colour picker's hex LineEdit input tooltip steals focus Editor: Colour picker's hex LineEdit input's tooltip steals focus Jul 15, 2023
@Sauermann
Copy link
Contributor

related to #73926.
Can you please check, if this happens, when Single Window Mode is enabled and when Single Window Mode is disabled in the Editor Settings?

@snailrhymer
Copy link
Contributor Author

Looks like it only happens when Single Window Mode is disabled - behviour is fine with Single Window Mode enabled.

@OribitCpp
Copy link

gui.key_focus is nullptr, when the cursor hover on lineEdit.
If the cursor move away, gui.key_focus has correct value.

image

@dalexeev
Copy link
Member

I reproduced the bug on Linux (Kubuntu 23.04).

@LauraWebdev
Copy link

Can confirm this also happens on macOS and Windows 11

@Calinou
Copy link
Member

Calinou commented Jan 5, 2024

I can still reproduce this as of 4.3.dev 13a0d6e (Linux, KDE X11, single-window mode disabled).

@afreytes
Copy link

I can still reproduce this as of 4.3.dev 13a0d6e (Linux, KDE X11, single-window mode disabled).

Have the same issue with v4.2.stable.official [46dc277] on Windows 10. Single Window mode is a workaround.

@passivestar
Copy link
Contributor

I have this too

Godot v4.3.dev (eaab89732) - macOS 14.4.1 - Vulkan (Forward+) - integrated Apple M1 Max - Apple M1 Max (10 Threads)

@rayzorite
Copy link

still getting it..
Godot 4.3 Dev 6

@anniryynanen
Copy link
Contributor

This seems to happen in all LineEdit + Button combinations, not just in the color picker. I have a scene with a line edit and buttons with tooltips, and the line edit becomes unresponsive to keyboard if any button tooltip is visible.

@anniryynanen
Copy link
Contributor

This focus issue also affects the buttons themselves inside native popup windows.

If I hover a button until the tooltip shows, then click the button, the button doesn't get pressed. The only thing that happens is that the tooltip is hidden. Then I have to click again to activate the button.

My poor resize canvas popup is very clunky.

I'm going to try to fix this. Emphasis on the "try" as I'm not familiar with the engine and don't know how difficult it is. Any pointers are very welcome.

@akien-mga akien-mga added this to the 4.3 milestone Jun 10, 2024
MewPurPur pushed a commit to MewPurPur/godot that referenced this issue Jul 11, 2024
Input events go to the tooltip because it's added to `popup_list` in
DisplayServer `popup_open`. I think there's no harm in tooltips being omitted
from the list, so this commit blocks non-popup windows from being added if they
have `FLAG_NO_FOCUS` and `FLAG_MOUSE_PASSTHROUGH`.

I'm not happy with this way of detecting tooltips. It'll also catch other
windows where this behavior may or may not be wanted.

I thought about adding `FLAG_TOOLTIP`, but went with the smaller change for
now.

Fixes godotengine#79500.
sorascode pushed a commit to sorascode/godot-soras-version that referenced this issue Jul 22, 2024
Input events go to the tooltip because it's added to `popup_list` in
DisplayServer `popup_open`. I think there's no harm in tooltips being omitted
from the list, so this commit blocks non-popup windows from being added if they
have `FLAG_NO_FOCUS` and `FLAG_MOUSE_PASSTHROUGH`.

I'm not happy with this way of detecting tooltips. It'll also catch other
windows where this behavior may or may not be wanted.

I thought about adding `FLAG_TOOLTIP`, but went with the smaller change for
now.

Fixes godotengine#79500.
2nafish117 pushed a commit to 2nafish117/godot that referenced this issue Aug 5, 2024
Input events go to the tooltip because it's added to `popup_list` in
DisplayServer `popup_open`. I think there's no harm in tooltips being omitted
from the list, so this commit blocks non-popup windows from being added if they
have `FLAG_NO_FOCUS` and `FLAG_MOUSE_PASSTHROUGH`.

I'm not happy with this way of detecting tooltips. It'll also catch other
windows where this behavior may or may not be wanted.

I thought about adding `FLAG_TOOLTIP`, but went with the smaller change for
now.

Fixes godotengine#79500.
chryan pushed a commit to chryan/godot that referenced this issue Aug 6, 2024
Input events go to the tooltip because it's added to `popup_list` in
DisplayServer `popup_open`. I think there's no harm in tooltips being omitted
from the list, so this commit blocks non-popup windows from being added if they
have `FLAG_NO_FOCUS` and `FLAG_MOUSE_PASSTHROUGH`.

I'm not happy with this way of detecting tooltips. It'll also catch other
windows where this behavior may or may not be wanted.

I thought about adding `FLAG_TOOLTIP`, but went with the smaller change for
now.

Fixes godotengine#79500.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.