-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Lost Focus after Fullscreen exit #1206
Comments
We're currently facing an issue, which seems a bit related: In our case, if we listen for the "backbutton" event directly on the app start (after deviceready), it won't be called unless the user first clicks at the webview/app. On older devices (eg. Android 6) this is working. On devices with Android 10 and 11, the user has to touch the app screen first, otherwise the "backbutton"-event won't be fired. |
Yes, I have to click the webview/app, the focus is back to the webview and it fires the "backbutton"-event. |
Same here with cordova-android 9.0.0 version |
This looks like an issue with Splash screen plugin. I've had a similar issue that BACK button closed the app unless something was clicked inside the app. Once 'it got focus' the BACK button started working normaly, i.e. it was caught by my handler. Relevent issue from splash screen project. Sorry for going off-topic a bit, i just wanted to clarify that BACK button not working at application start is a different issue. |
Any news when this PR will be merged? |
Bug Report
Problem
What is expected to happen?
After entering in fullscreen mode of a video then press the back button of android the fullscreen mode exits.
If you then press the back button again it should dispatch the 'backbutton' event.
What does actually happen?
After entering in fullscreen mode of a video then press the back button of android the fullscreen mode exits.
If you then press the back button again it does not dispatch the 'backbutton' event and closes the app.
Information
The focus does not requested after "hide the custom view". So the context of the 'backbutton' is not the WebView.
Command or Code
in #822 is fix to avoid this bug: #822 (comment)
In
CordovaWebViewImpl.java:hideCustomView
addengine.getView().requestFocus();
afterengine.getView().setVisibility(View.VISIBLE);
Fork of same user have inserted the code:
https://github.com/josephlodero/cordova-android/blob/backbuttonfix/framework/src/org/apache/cordova/CordovaWebViewImpl.java
Environment, Platform, Device
Android, testet on Samsung SM-G780F (Galaxy S20 FE). Other developers on other android devices have the same issue.
Version information
cordova-cli: 10.0.0
cordova-android: 9.0.0
Checklist
The text was updated successfully, but these errors were encountered: