From c3f977cf74c8d510613cb671fee25e230d741b14 Mon Sep 17 00:00:00 2001 From: Doug Kearns Date: Sat, 9 Oct 2010 04:18:59 +1100 Subject: [PATCH] Prevent endless TEXTAREA->INSERT->TEXTAREA mode stacking. --HG-- branch : mode-refactoring --- common/content/editor.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/common/content/editor.js b/common/content/editor.js index 0244d5f9..32052505 100644 --- a/common/content/editor.js +++ b/common/content/editor.js @@ -611,7 +611,12 @@ const Editor = Module("editor", { mappings.add([modes.INSERT], [""], "Edit text field in Vi mode", - function () { modes.push(modes.TEXTAREA); }); + function () { + if (!editor.isTextArea) + modes.push(modes.TEXTAREA); + else + dactyl.beep(); + }); mappings.add([modes.INSERT], ["", ""], "Expand insert mode abbreviation",