How to disable user Text selection in flutter_inappwebview 6.0.0 Plugin We are using This method but its working fine in Android and iOS its not working . Can you Please provide me with a better solution.
Plugin Version => flutter_inappwebview 6.0.0
iOS Tesing Device => iPhone7
Flutter Version => Flutter 3.16.3
Dart Version => Dart 3.2.3
code => onLoadStop: (controller, url) async {
// Inject JavaScript code to disable text selection for every page load
controller.evaluateJavascript(source: '''
document.body.style.userSelect = 'none';
document.body.style.webkitTouchCallout = 'none';
document.documentElement.style.touchAction = "pan-x pan-y";
''');
Utility.safePrint("On-Load-Stop-Url: $url");
setState(() {
this.url = url.toString();
});
// Additional logic after page load stops
pullToRefreshController?.endRefreshing();
webCookie = await controller.evaluateJavascript(
source: "document.cookie");
getInitialCartData();
setState(() {
loading = false;
displayLoader(false);
});
},
How to disable user Text selection in flutter_inappwebview 6.0.0 Plugin We are using This method but its working fine in Android and iOS its not working . Can you Please provide me with a better solution.
Plugin Version => flutter_inappwebview 6.0.0
iOS Tesing Device => iPhone7
Flutter Version => Flutter 3.16.3
Dart Version => Dart 3.2.3
code => onLoadStop: (controller, url) async {
// Inject JavaScript code to disable text selection for every page load
controller.evaluateJavascript(source: '''
document.body.style.userSelect = 'none';
document.body.style.webkitTouchCallout = 'none';
document.documentElement.style.touchAction = "pan-x pan-y";
''');