-
Notifications
You must be signed in to change notification settings - Fork 84
Fix virtual keyboard behaviour on mobile browsers in iOS #2033
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tbh it sounds suspicious and risky, but I won't block it as a hotfix with keeping in mind that we need to rework it properly after that
backingElement.focus() | ||
} | ||
}, AddEventListenerOptions(once = true)) | ||
backingElement.click() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will it trigger any security policies in browsers?
// unfortunately on ios touch devices focus won't happen asynchronously | ||
// this leads to https://youtrack.jetbrains.com/issue/CMP-8013 | ||
// which we are circumventing via focusing in a triggered click event | ||
backingElement.addEventListener("click", { evt -> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a situation where our event will be handled by somebody else instead of this callback?
@@ -54,9 +54,16 @@ internal class BackingDomInput( | |||
} | |||
|
|||
fun focus() { | |||
window.requestAnimationFrame { | |||
// we focusing in next frame as a part of fix for https://youtrack.jetbrains.com/issue/CMP-7836/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is "focusing in next frame" still correct comment? I see that we removed window.requestAnimationFrame. Is it now about that we request in a handler that is also in the next frame?
We've came up to an agreement that this looks, very, very suspicios, unreliable and kludgy |
Fixes https://youtrack.jetbrains.com/issue/CMP-8013
Testing
Manual plus
./gradlew testWeb
Release Notes
N/A