This is an automated email from the ASF dual-hosted git repository.
erisu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cordova-android.git
The following commit(s) were added to refs/heads/master by this push:
new 6cbf69d fix: restore key event handlers when DOM element is
fullscreen (#1157)
6cbf69d is described below
commit 6cbf69d109cccb2189537f27fa53bcf203490732
Author: goffioul <[email protected]>
AuthorDate: Tue Mar 30 01:54:43 2021 -0400
fix: restore key event handlers when DOM element is fullscreen (#1157)
* GH-1156: Restore key event handlers when a DOM element is fullscreen
Make sure to call dispatchKeyEvent from base class in WrapperView, if
the event hasn't been handled by the engine.
* Remove unwanted whitespace in condition
Co-authored-by: エリス <[email protected]>
Co-authored-by: Michael Goffioul <[email protected]>
---
framework/src/org/apache/cordova/CordovaWebViewImpl.java | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/framework/src/org/apache/cordova/CordovaWebViewImpl.java
b/framework/src/org/apache/cordova/CordovaWebViewImpl.java
index 8fa313a..92579a8 100644
--- a/framework/src/org/apache/cordova/CordovaWebViewImpl.java
+++ b/framework/src/org/apache/cordova/CordovaWebViewImpl.java
@@ -265,7 +265,12 @@ public class CordovaWebViewImpl implements CordovaWebView {
@Override
public boolean dispatchKeyEvent(KeyEvent event) {
- return engine.getView().dispatchKeyEvent(event);
+ boolean ret = engine.getView().dispatchKeyEvent(event);
+ if (!ret) {
+ // If the engine didn't handle the event, handle it normally.
+ ret = super.dispatchKeyEvent(event);
+ }
+ return ret;
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]