breautek commented on PR #1831: URL: https://github.com/apache/cordova-android/pull/1831#issuecomment-3806119704
> This is a partial solution based on my testing. Launching the emulated back button key: `adb shell input keyevent 4` works fine. > > However, when you use the back event directly (like the image), it gets captured in the callback and doesn't propagate to the webview. <img alt="image" width="398" height="262" src="https://private-user-images.githubusercontent.com/817340/541127740-30f9571b-c600-4d1a-9331-0ed6d69c1ce6.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Njk1MzA4NDYsIm5iZiI6MTc2OTUzMDU0NiwicGF0aCI6Ii84MTczNDAvNTQxMTI3NzQwLTMwZjk1NzFiLWM2MDAtNGQxYS05MzMxLTBlZDZkNjljMWNlNi5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjYwMTI3JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI2MDEyN1QxNjE1NDZaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT00ODM5MzdhZTk4MDhmYTM1OTlkM2ZjNDE1M2Q4MDcyZDY2OWNhOWYxZjhmMzFmZjQwN2IyMDFmMTExNTA2YmZiJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.3lIFgqHG2JaJmONc4rzaElMgrmNM7_HXY9KFazbSMKc"> > > Adding the `backCallback = () → { webview.backHistory(); };` works, but then the emulated key make two back actions. This PR is not in any stable release at the moment, but if you install the `nightly` version of the platform, you should find that the back callback is not fired twice. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
