Closed junior-g closed 1 year ago
+++
@junior-g If you google "js disable context menu" you will find a way to disable this. But since epubjs is rendering the epub-file inside an iframe I am not sure if disabling this on the parent document also disable it inside the iframe.
I tried but didn't worked for me. Also i am using react-reader for Mobile Webview
@junior-g You just need to dig into epubjs rendition
and apply pressure:
<ReactReader
getRendition={(_rendition: Rendition) => {
rendition.current = _rendition
_rendition.hooks.content.register((contents: Contents) => {
const body = contents.window.document.querySelector('body')
if (body) {
body.oncontextmenu = () => {
return false
}
}
})
}}
/>
I am developing a note-taking feature where use 1st select the text then a pop-up will appear with a custom box. But now it is opening "copy", "share", "select all", "web search" etc. is there any way I can override these? It is in the Android Mobile view.