Note that there are some explanatory texts on larger screens.

plurals
  1. PORemoving tinyMCE Editor.onKeyPress event - breaks in Opera
    primarykey
    data
    text
    <p>I am using a tinyMce editor in our website. At the first pageload I set an onkeypress event handler like this:</p> <pre><code>window.onload = function () { tinyMCE.activeEditor.onKeyPress.add(function () { startCookieInterval() }); } </code></pre> <p>This works fine in firefox and chrome, but in opera it throws this javascript error:</p> <pre><code>Uncaught exception: TypeError: Cannot convert 'tinyMCE.activeEditor' to object </code></pre> <p>So I changed the window.onload to document.onload in case the tinyMce editor hasn't properly initialised by window.onload. This then works fine, up to the point where the event handler is called for the first time. Here I remove the event handler, because I only want to run it once:</p> <pre><code>function startCookieInterval() { tinyMCE.activeEditor.onKeyPress = null; cookieIntervalTick(); } </code></pre> <p>After this, on every keypress, the following javascript error occurs:</p> <pre><code>[07/05/1983 08:35:36] JavaScript - http://localhost:10166/4_advice_only/editadviceitem.aspx?ADIID=13127831 Event thread: keypress Uncaught exception: TypeError: Cannot convert 'v[x[t.fakeType || t.type]]' to object Error thrown at line 8641, column 20 in r(t, A) in http://localhost:10166/includes/tiny_mce_3_3_8/tiny_mce.js: v[x[t.fakeType || t.type]].dispatch(v, t, A) called via Function.prototype.call() from line 3686, column 16 in &lt;anonymous function: g&gt;(n) in http://localhost:10166/includes/tiny_mce_3_3_8/tiny_mce.js: return l.call(j, n) </code></pre> <p>None of this happens in any other browsers. Please share your thoughts. Thanks</p> <p>hofnarwillie</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload