[Zope] Mozilla and Tabs in Textareas the 2nd
Christian Zagrodnick
cz@gocept.com
Mon, 16 Jul 2001 12:12:05 +0200
--2oS5YaxWCcQjTEyO
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Of course I forgot the patch.... as always...
--
Christian Zagrodnick
gocept gmbh & co. kg - schalaunische strasse 6 - 06366 koethen/anhalt
fon. +49 3496 3099114
fax. +49 3496 3099118
mob. +49 173 9078826
mail. cz@gocept.com
--2oS5YaxWCcQjTEyO
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="mozilla-tab.patch"
diff -u --recursive mozilla.orig/editor/base/nsEditorEventListeners.cpp mozilla/editor/base/nsEditorEventListeners.cpp
--- mozilla.orig/editor/base/nsEditorEventListeners.cpp Wed Jun 20 07:18:12 2001
+++ mozilla/editor/base/nsEditorEventListeners.cpp Tue Jul 3 09:06:59 2001
@@ -242,13 +242,15 @@
aKeyEvent->PreventDefault(); // consumed
return NS_OK;
break;
-
- case nsIDOMKeyEvent::DOM_VK_TAB:
- if ((flags & nsIPlaintextEditor::eEditorSingleLineMask) ||
- (flags & nsIPlaintextEditor::eEditorPasswordMask) ||
- (flags & nsIPlaintextEditor::eEditorWidgetMask))
- return NS_OK; // let it be used for focus switching
+ case nsIDOMKeyEvent::DOM_VK_TAB:
+
+ // -cz@gocept.com
+ if (flags & nsIPlaintextEditor::eEditorSingleLineMask) {
+ if ((flags & nsIPlaintextEditor::eEditorPasswordMask) ||
+ (flags & nsIPlaintextEditor::eEditorWidgetMask))
+ return NS_OK; // let it be used for focus switching
+ }
// else we insert the tab straight through
textEditor->HandleKeyPress(keyEvent);
ScrollSelectionIntoView(mEditor);
diff -u --recursive mozilla.orig/editor/base/nsPlaintextEditor.cpp mozilla/editor/base/nsPlaintextEditor.cpp
--- mozilla.orig/editor/base/nsPlaintextEditor.cpp Wed Jun 13 00:21:12 2001
+++ mozilla/editor/base/nsPlaintextEditor.cpp Sat Jun 30 19:28:18 2001
@@ -513,7 +513,9 @@
nsString empty;
return TypedText(empty, eTypedText);
}
-
+
+
+ if (keyCode == nsIDOMKeyEvent::DOM_VK_TAB) character = '\t'; // cz@gocept.com
if (character && !altKey && !ctrlKey && !isShift && !metaKey)
{
nsAutoString key(character);
--2oS5YaxWCcQjTEyO--