forked from akai/readest
compat(android): disable native long-click on the WebView to prevent the system image context menu, closes #3629 (#3630)
This commit is contained in:
+5
@@ -30,6 +30,11 @@ class MainActivity : TauriActivity(), KeyDownInterceptor {
|
||||
|
||||
override fun onWebViewCreate(webView: WebView) {
|
||||
wv = webView
|
||||
// Disable native long-click on the WebView to prevent the system image context menu.
|
||||
// On Android 8.0 (Oreo), the native image context menu can freeze the entire touch system,
|
||||
// requiring a forced reboot. Text selection still works as it's handled by WebView internally.
|
||||
webView.isLongClickable = false
|
||||
webView.setOnLongClickListener { true }
|
||||
}
|
||||
|
||||
private val keyEventMap = mapOf(
|
||||
|
||||
Reference in New Issue
Block a user