sleemanj / xinha

WYSIWYG HTML Editor Component (turns <textarea> into HTML editors)
http://trac.xinha.org/
Other
13 stars 2 forks source link

Xinha does not work anymore in Firefox 22 AND Chrome 28 (Trac #1609) #1609

Closed sleemanj closed 4 years ago

sleemanj commented 11 years ago

Xinha does not work anymore in Firefox 22 AND Chrome 28

I get the Error: TypeError: Illegal constructor

Reported by guest, migrated from http://trac.xinha.org/ticket/1609

sleemanj commented 11 years ago

guest commented:

line 3007: var obj = new plugin(this, args);

sleemanj commented 11 years ago

guest commented:

The error occurs in combination with the Plugin: CSS

sleemanj commented 11 years ago

guest commented:

I can confirm that this is an issue in Firefox 22.

I wasn't able to investigate very deeply, but it seems as though there's a conflict with using CSS as an object name. I tried changing the name of the plugin (at least temporarily) and it seems to work fine now.

Directory/file name changes: plugins/CSS/ -> plugins/CSSDropdowns/ plugins/CSS/CSS.js -> plugins/CSSDropdowns/CSSDropdowns.js

Plugin changes: function CSS( -> function CSSDropdowns( CSS.prototype. -> CSSDropdowns.prototype.

Configuration changes: 'CSS' -> 'CSSDropdowns' in the xinha_plugins configuration section

sleemanj commented 11 years ago

Thanks, I can reproduce the issue and I think your solution is the right approach. It might be worth also adding some explicit checks for the "CSS" plugin name for backwards-compatibility. I'll commit this ASAP.

sleemanj commented 11 years ago

1337