Skip to content

Instantly share code, notes, and snippets.

@wilson
Created June 29, 2010 16:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wilson/457452 to your computer and use it in GitHub Desktop.
Save wilson/457452 to your computer and use it in GitHub Desktop.
diff -r bffbd5686e74 common/content/buffer.js
--- a/common/content/buffer.js Mon Jun 28 23:40:01 2010 +0200
+++ b/common/content/buffer.js Tue Jun 29 12:38:35 2010 -0400
@@ -1532,7 +1532,7 @@
if (count < 1 && buffer.lastInputField)
buffer.focusElement(buffer.lastInputField);
else {
- let xpath = ["input[not(@type) or @type='text' or @type='password' or @type='file']",
+ let xpath = ["input[not(@type) or @type='text' or @type='password' or @type='file' or @type='search']",
"textarea[not(@disabled) and not(@readonly)]",
"iframe"];
diff -r bffbd5686e74 common/content/events.js
--- a/common/content/events.js Mon Jun 28 23:40:01 2010 +0200
+++ b/common/content/events.js Tue Jun 29 12:38:35 2010 -0400
@@ -671,7 +671,7 @@
if (elem && elem.readOnly)
return;
- if ((elem instanceof HTMLInputElement && /^(text|password)$/.test(elem.type)) ||
+ if ((elem instanceof HTMLInputElement && /^(text|password|search)$/.test(elem.type)) ||
(elem instanceof HTMLSelectElement)) {
liberator.mode = modes.INSERT;
if (hasHTMLDocument(win))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment