forked from github/cordova-android
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: エリス <erisu@users.noreply.github.com> Co-authored-by: Michael Goffioul <michael.goffioul@lincor.com>
This commit is contained in:
parent
e8ec3b1e37
commit
6cbf69d109
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user