Open KhaledAbdElNasserAhmed opened 1 year ago
Hello @KhaledAbdElNasserAhmed, we currently do not provide this. Can you please explain under which conditions text selection would be disabled? Would it be based on some metadata inside the Epub, or globally in the whole app?
Globally in the whole ereader, I am currently using your library in one of my book publishing apps, the user can select text from the whole book and paste it anywhere, which is not helpful when publishing paid books, so I was able to disable copying and screen shooting in Android in the whole epub reader but failed to do the same in IOS, any insights on how to disable text sharing / selection and copying would be wonderful.
I think it has something to do with the kwebviewer that is used in IOS.
@KhaledAbdElNasserAhmed Thank you for the explanation. Understood. You need a global setting. I'll provide it through the API.
Globally in the whole ereader, I am currently using your library in one of my book publishing apps, the user can select text from the whole book and paste it anywhere, which is not helpful when publishing paid books, so I was able to disable copying and screen shooting in Android in the whole epub reader but failed to do the same in IOS, any insights on how to disable text sharing / selection and copying would be wonderful.
I think it has something to do with the kwebviewer that is used in IOS.
Dear Developer
I found that selecting text for this project on iOS does not trigger a pop event in the code, but it is normal on Android. I see you raised this question. Do you understand how to make selected events on iOS also be captured? Thank you!。
@KhaledAbdElNasserAhmed if you upgrade to InAppWebView 6.x and ios 13.0+, you could use this property to disable text selection: isTextInteractionEnabled: false
@winterdl Thanks for the tip. I had yet to see this beta. If I read the Apple documentation and InAppWebView source code correctly, it is available in iOS 14.5 (iOS 15 in InAppWebView's source code). I'd happily integrate this setting, but setting the minimum iOS to 15 is pretty radical. Any thoughts, @westernbuptboy @winterdl @KhaledAbdElNasserAhmed?
No big danger according to this article. I should probably move forward....
I implemented and tested it, it works as expected. I haven't found a similar option for Android. Id' like to avoid injecting JS to do this. Any hint? For now I'm not doing the PR, I'll wait until I have a clean solution for Android.
@KhaledAbdElNasserAhmed if you upgrade to InAppWebView 6.x and ios 13.0+, you could use this property to disable text selection: isTextInteractionEnabled: false
Selecting text on iOS cannot pop up a custom window, only the default window pops up. Is there a way to solve this?
maybe i find the solution update the flutter_inappwebview plugin https://github.com/pichillilorenzo/flutter_inappwebview/pull/1575
Is there any way to disable text copying in IOS, can you provide any hints or methods to use to that.