From 01d9ffcc4de9b9e546a5455cbe97be150c1b2718 Mon Sep 17 00:00:00 2001 From: Martin Stubenschrott Date: Mon, 31 Mar 2008 20:44:48 +0000 Subject: [PATCH] doesn't beep anymore when there is no text to delete --- content/editor.js | 3 ++- content/events.js | 26 ++------------------------ 2 files changed, 4 insertions(+), 25 deletions(-) diff --git a/content/editor.js b/content/editor.js index 567675cd..e7fe2dcb 100644 --- a/content/editor.js +++ b/content/editor.js @@ -237,7 +237,8 @@ liberator.Editor = function () //{{{ // broken in FF3, deletes the whole line: // liberator.editor.executeCommand("cmd_deleteToBeginningOfLine", 1); liberator.editor.executeCommand("cmd_selectBeginLine", 1); - liberator.editor.executeCommand("cmd_delete", 1); + if (getController().isCommandEnabled("cmd_delete")) + liberator.editor.executeCommand("cmd_delete", 1); }); liberator.mappings.add(modes, diff --git a/content/events.js b/content/events.js index 34c782df..79dd94d0 100644 --- a/content/events.js +++ b/content/events.js @@ -480,6 +480,7 @@ liberator.Events = function () //{{{ else liberator.echo("Waiting for page to load..."); } + liberator.modes.show(); // TODO: allow macros to be continued when page does not fully load with an option var ret = (liberator.buffer.loaded == 1); @@ -1115,30 +1116,7 @@ liberator.Events = function () //{{{ || liberator.mode == liberator.modes.INSERT) { if (key == "") - { - /*if (liberator.modes.isReplaying != 44) - { - // TODO: how to really submit the correct form? - //content.document.forms[0].submit(); - var elem = document.commandDispatcher.focusedElement; - if (elem) - { - liberator.log("dipatching "); - event.ignore = true; - try{ - elem.dispatchEvent(event); - } catch (e) { alert(e); } - event.stopPropagation(); - event.preventDefault(); - liberator.log("dipatched"); - waitForPageLoaded(); - liberator.log("page loaded"); - return false; - } - } - else*/ - return false; - } + return false; else if (key == "" || key == "" || key == "") return false; }