r1377 - trunk/mozile

[email protected]
Newsgroups gmane.editors.bitflux.cvs
Message-ID <[email protected]>
Author: chregu
Date: Sat Sep  3 14:11:03 2005
New Revision: 1377

Modified:
   trunk/mozile/mozilekb.js
Log:
use    bxe_deleteEventKey(sel); function for selected text input
http://cvs.wyona.org/cgi-bin/bugzilla/show_bug.cgi?id=1314

Modified: trunk/mozile/mozilekb.js
==============================================================================
--- trunk/mozile/mozilekb.js	(original)
+++ trunk/mozile/mozilekb.js	Sat Sep  3 14:11:03 2005
@@ -484,27 +484,8 @@
 		if(!cssr.collapsed)
 		{
 			var backspace = false;
-			if (!sel.isCollapsed && sel.anchorNode.nodeType == 3 && sel.anchorOffset == 0) {
-				
-				
-				bxe_deleteWholeSelection(sel,backspace);
-				sel.anchorNode.parentNode.updateXMLNode();
-				sel = window.getSelection();
-				
-				ip = documentCreateInsertionPoint(cssr.top, cssr.startContainer, cssr.startOffset);
-				ip.insertCharacter(event.charCode);
-				
-				sel.deleteSelection(false);
-				sel.anchorNode.updateXMLNode();
-				sel.collapse(ip.ipNode, ip.ipOffset);
-				return true;
-				
-			} else if (sel.isCollapsed) {
-				sel.deleteSelection(backspace);
-			} else {
-				sel.deleteSelection(backspace);
-				sel.anchorNode.parentNode.updateXMLNode();
-			}
+			
+			bxe_deleteEventKey(sel);
 		}
 
 		// seems to mess up the current position!
@@ -546,7 +527,6 @@
 		// this prevents some problems with updateXMLNode and unifies the handling
 		// Bug 635 caused this and
 		// http://cvs.wyona.org/cgi-bin/bugzilla/show_bug.cgi?id=3015
-		
 		if (!sel.isCollapsed && sel.focusNode.nodeType == 3 ) {
 			var _pos = sel.focusNode.compareDocumentPosition(sel.anchorNode);
 			if (_pos  & 4) {
-- 
Bx-editor-cvs mailing list
[email protected]
http://lists.bitflux.ch/cgi-bin/listinfo/bx-editor-cvs
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.