You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(android): intercept ESCAPE key ACTION_DOWN in Modal to prevent premature dismiss
The Modal's OnKeyListener previously only handled BACK/ESCAPE on ACTION_UP,
but Dialog.onKeyDown() directly calls cancel() for KEYCODE_ESCAPE on
ACTION_DOWN (unlike KEYCODE_BACK, which defers to onBackPressed on ACTION_UP).
As a result, ESCAPE closed the dialog before JS was ever notified.
Restructure the listener to branch on keyCode first:
- For BACK/ESCAPE: consume ACTION_DOWN to block Dialog's default handling,
then call handleCloseAction() on ACTION_UP so JS can decide whether to close.
- For all other keys: keep the existing behavior of forwarding ACTION_UP to
the current Activity (needed by the dev menu, etc.).
0 commit comments