diff --git a/NEWS b/NEWS index 994798d7..c41cbdb6 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,7 @@
2008-06-xx:
* version 1.2
+ * don't pass any ctrl- or alt- prefixed keys to firefox in insert mode
* keywords in :open have higher priority than local files now
2008-06-03:
diff --git a/content/bookmarks.js b/content/bookmarks.js
index 66cc81e4..40c7d536 100644
--- a/content/bookmarks.js
+++ b/content/bookmarks.js
@@ -53,7 +53,7 @@ liberator.Bookmarks = function () //{{{
function load()
{
// update our bookmark cache
- bookmarks = []; // also clear our bookmark cache
+ bookmarks = [];
keywords = [];
var folders = [bookmarksService.toolbarFolder, bookmarksService.bookmarksMenuFolder, bookmarksService.unfiledBookmarksFolder];
diff --git a/content/events.js b/content/events.js
index fa8a2479..5c69b011 100644
--- a/content/events.js
+++ b/content/events.js
@@ -1311,13 +1311,18 @@ liberator.Events = function () //{{{
// allow key to be passed to firefox if we can't handle it
stop = false;
- if (liberator.mode == liberator.modes.COMMAND_LINE)
+ // allow ctrl- or alt- prefixed keys only in NORMAL mode, as it is annoying
+ // if you press ctrl-o in a textarea and the file->open dialog pops up
+ if (liberator.mode != liberator.modes.NORMAL && (event.ctrlKey || event.metaKey || event.altKey))
+ {
+ stop = true;
+ liberator.beep();
+ }
+ else if (liberator.mode == liberator.modes.COMMAND_LINE)
{
if (!(liberator.modes.extended & liberator.modes.INPUT_MULTILINE))
- stop = !liberator.commandline.onEvent(event); // reroute event in command line mode
+ liberator.commandline.onEvent(event); // reroute event in command line mode
}
- else if (liberator.mode != liberator.modes.INSERT)
- liberator.beep();
}
}