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

Fix ColorPicker virtual keyboard popup on mobile #97807

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

syntaxerror247
Copy link
Contributor

This PR fixes auto popup of virtual keyboard when colorPickerButton is pressed on mobile devices.
Fixes #88235

@syntaxerror247 syntaxerror247 force-pushed the colorPicker_kb_fix branch 3 times, most recently from c912f00 to 6f795f8 Compare October 4, 2024 11:37
@syntaxerror247 syntaxerror247 marked this pull request as ready for review October 4, 2024 11:47
@WhalesState
Copy link
Contributor

WhalesState commented Oct 4, 2024

It looks good but I don't know if we should return from TextEdit and LineEdit show_virtual_keyboard instead, to avoid showing the virtual keyboard when a physical keyboard is detected, at least we can do it for android and ios only but what if the users still wants to use the virtual keyboard ? There's no option to prefer virtual keyboard over physical one.

@syntaxerror247
Copy link
Contributor Author

@WhalesState Isn't this the current behaviour, virtual keyboard does not appear if physical keyboard is connected.

@WhalesState
Copy link
Contributor

@WhalesState Isn't this the current behaviour, virtual keyboard does not appear if physical keyboard is connected.

There was no way to check for physical keyboards before, it was recently merged so it always show the virtual keyboard on android and ios by default.

@WhalesState
Copy link
Contributor

That's why i have applied a hack for this, since focusing any LineEdit or TextEdit will still show the virtual keyboard even if a hardware keyboard is connected, but I don't know if there are any opened issues or discussions about this.

@syntaxerror247
Copy link
Contributor Author

syntaxerror247 commented Oct 4, 2024

There was no way to check for physical keyboards before, it was recently merged so it always show the virtual keyboard on android and ios by default.

No, virtual keyboard doesn't appear if physical kb is connected even before that PR . This was used internally just wasn't exposed.

@WhalesState
Copy link
Contributor

There's an option on android Physical keyboard settings Show on-screen keyboard while a physical keyboard is being used, which is true by default.

@syntaxerror247
Copy link
Contributor Author

syntaxerror247 commented Oct 4, 2024

There's an option on android Physical keyboard settings Show on-screen keyboard while a physical keyboard is being used, which is true by default.

I just checked in two different devices and it was turned off in Motorola and turned on in Xiaomi, both are default.
So, yeah the only way to fix this will be to not call show_virtual_keyboard() in lineEdit and textEdit.

But that is out of scope of this PR.

@AThousandShips AThousandShips changed the title Fix colorPicker virtual keyboard popup on mobile Fix ColorPicker virtual keyboard popup on mobile Oct 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Color Picker on Mobile causes keyboard to popup by default
3 participants