docwhat/itsalltext

Upgraded Firefox to 25.0.1, javascript error upon saving.

Closed this issue · 2 comments

skyl commented

In this very textarea on github,
I hit save with my editor (MacVim).

The yellow background flashes. The content of the textarea updates.

In the console,

Error: Permission denied to access property 'type' @ https://github.global.ssl.fastly.net/assets/frameworks-bca527bb59d94c16d6bf2a759779d7953fa41e76.js:2

On a site I'm working on, I get a similar error:

Error: Permission denied to access property 'type' @ /static/admin/js/jquery.js:2749

There, I'm listening for the change event on the textarea.
The change event no longer gets fired
when I save from my editor.

I did not have this problem before upgrading FF today.

Hello!

The yellow background flashes.

Do you mean the normal fade from yellow? Or it happens quickly?

I'm not sure how IAT can create those errors in external JavaScript libraries.... Have you tried disabling IAT and seeing if the errors still happen?

The change event no longer gets fired when I save from my editor.

Interesting. That might be related to something similar to this stack overflow

I'll take a look at it when I have time. At the moment, I'm dealing with a death in the family. No promises when I'll get to it.

Patches are welcome!

Hello! I'm new to GitHub, so I put a patch for this issue here as a quick fix:

--- cacheobj.js.orig    2014-01-10 14:22:11.000000000 +0100
+++ cacheobj.js 2014-01-10 14:23:58.000000000 +0100
@@ -579,7 +579,7 @@
             this.fade(20, 100);
             this.node.value = value;

-            var event = document.createEvent("HTMLEvents");
+            var event = this.node.ownerDocument.createEvent("HTMLEvents");
             event.initEvent('change', true, false);
             this.node.dispatchEvent(event);

(diff against 8516c26)

Cheers!