title: How to disable right click on embed tag?
body: <p>Actually I want to refrain user from downloading the pdf. Tried disabling it by adding event listener.</p>
  <pre><code>useEffect(() =&gt; {
      let element = document.getElementById('pdf-div')
  
      if(element)
        element.addEventListener(&quot;contextmenu&quot;, (event: any) =&gt; event.preventDefault());
    }, [])
    return (
      &lt;&gt;
        {
          file.includes('.png') ? 
            &lt;img src={require(`./../../mocks/${file}`)} alt=&quot;&quot; className='pdf-document-img' /&gt; :
            &lt;object id={'pdf-div'} ref={ref} className='pdf-document' data={`${file}#toolbar=0`} type=&quot;application/pdf&quot;&gt;
              &lt;embed id={'pdf-div'} ref={ref} src={file} type=&quot;application/pdf&quot; /&gt;
            &lt;/object&gt;
        }
      &lt;/&gt;
    );
  </code></pre>