0

So there's this iFrame that I can access easily using the .contents() method.

I'd like to remove the 'keypress' event that seems to be assigned to the iFrame's document-element and that prevents me from typing with the keyboard.

I can remove it manually using: Inspect > Eventlisteners > keypress > document > remove

After that, I can type.

So I was wondering if there was a way to remove the event by code, using jQuery.

By the way, I already know how to remove events from elements like 'body' 'div' 'p' and so on. But I can't get the syntax for the '#document' itself.

here is a preview of the iFrame's code. Thanks a lot.

<iframe src=(unknown) frameborder="0" class="cke_wysiwyg_frame cke_reset" style="width: 100%; height: 100%;" title="textUpItemDisplay" tabindex="0" allowtransparency="true" id="myIframe">
#document
<html dir="rtl">
<head>
<title data-cke-title="textUpItemDisplay">textUpItemDisplay</title>
</head>

<body contenteditable="true" class="cke_editable cke_editable_themed cke_contents_rtl" spellcheck="false">

<p style="font-family: &quot;DIN Next LT Arabic Light&quot;; color: rgb(54, 54, 125);">
SOMETEXT
</p>

</body>
</html>
</iframe>
Hicham
  • 21
  • 6
  • `#document` isn't an id. The iframe document is the document under the iframes content window. You can search on Stack Overflow for how to access an iframes document with javascript and find existing questions. – Taplar Jun 19 '18 at 16:08
  • 1
    Possible duplicate of [Get IFrame's document, from JavaScript in main document](https://stackoverflow.com/questions/3999101/get-iframes-document-from-javascript-in-main-document) – Taplar Jun 19 '18 at 16:09

0 Answers0