godot
godot copied to clipboard
Fix uneditable `LineEdit`, `TextEdit` and `CodeEdit` virtual keyboard popup on mobile
Fixes #97993
Looks good to me! Alas, I cannot do reviews.
@SkogiB if you are able to test this you are very welcome to provide feedback, a review by a maintainer will be required to merge this but anyone that is able to provide feedback is welcome to do so, especially testing (it helps a lot to test on different hardware and contexts)
Beware I'm not too familiar with lineEdit and TextEdit. This looks good but I think it would be best to keep it consistant between the two classes. Either it makes no sense to want to show when it is disabled and it should be prevented in both case or it might make some case and then in both case it should be handled before calling. I don't see any reason to show it so I'm more in favour of preventing it but I'm not that familiar with those classes so TIWAGOS.
@ajreckof I have updated it to keep it consistant between the two classes. Now check for editable is done before calling show_virtual_keyboard().
Should the virtual keyboard automatically hide if the control is set to read-only after the keyboard has already been shown?
Edit: Been thinking about this. I can think of reasons for both, so this could likely be a toggleable feature (would require another issue)
Thanks!