r1791 - branches/bxe_2_0/mozile

[email protected] Mon, 19 Nov 2007 17:12:12 +0100 (CET)
Newsgroups gmane.editors.bitflux.cvs
Message-ID <[email protected]>
Author: chregu
Date: Mon Nov 19 17:12:12 2007
New Revision: 1791

Log:
some more checks BXEB-57


Modified:
   branches/bxe_2_0/mozile/mozilekb.js

Modified: branches/bxe_2_0/mozile/mozilekb.js
==============================================================================
--- branches/bxe_2_0/mozile/mozilekb.js	(original)
+++ branches/bxe_2_0/mozile/mozilekb.js	Mon Nov 19 17:12:12 2007
@@ -535,7 +535,7 @@
 		}
 		var _ch = String.fromCharCode(event.charCode);
 		if(startOff > 0) {
-			if (startC.substringData(startOff-1,1) == STRING_NBSP) {
+			if (startC.substringData && startC.substringData(startOff-1,1) == STRING_NBSP) {
 				startC.replaceData(startOff-1,1," ");
 			}
 		}
@@ -560,8 +560,11 @@
 				textNode.insertData(startOff , _ch);
 			} catch (e) {
 				//try again with normalized
-				textNode.parentNode.betterNormalize();
-				textNode.insertData(startOff , _ch);
+				try {
+					textNode.parentNode.betterNormalize();
+					textNode.insertData(startOff , _ch);
+				} catch (e) {
+				}
 				
 			}
 			//textNode._childPosition = _position;
-- 
Bx-editor-cvs mailing list
[email protected]
http://lists.bitflux.ch/cgi-bin/listinfo/bx-editor-cvs