Menu

#45 [PAtch] HTML area annoying error message with Firefox fixed

v1.0 (example)
open
nobody
htmlarea (20)
5
2006-11-25
2006-11-25
Anonymous
No

With Filefox, editing of web pages is marred with the following error message:

Error: el.tagName has no properties
Line: 2133
URL: http://wikiwig.free.fr/wikiwig-V4.1/_wk/Area/htmlarea.js

Here is a patch/workaround to fix this:

--- htmlarea.js.sav 2006-11-25 21:30:39.000000000 +0100
+++ htmlarea.js 2006-11-25 21:23:44.000000000 +0100
@@ -2130,6 +2130,7 @@

HTMLArea.isBlockElement = function(el) {
var blockTags = " body form textarea fieldset ul ol dl li div p h1 h2 h3 h4 h5 h6 quote pre table thead tbody tfoot tr td iframe address ";
+ if (typeof( el.tagName ) != "string" ) return false;
return (blockTags.indexOf(" " + el.tagName.toLowerCase() + " ") != -1); //here error js
};

Emmanuel BUU
http://www.ives.fr/

Discussion


Log in to post a comment.