Created
July 27, 2012 22:05
-
-
Save RudyLu/3190691 to your computer and use it in GitHub Desktop.
form.js patch for <select> on Gaia
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff -r b5c4b792f3f2 b2g/chrome/content/forms.js | |
--- a/b2g/chrome/content/forms.js Mon Jul 30 17:20:58 2012 +0300 | |
+++ b/b2g/chrome/content/forms.js Mon Jul 30 16:08:55 2012 -0700 | |
@@ -61,6 +61,7 @@ | |
content.setTimeout(function showIMEForSelect() { | |
sendAsyncMessage("Forms:Input", getJSON(evt.target)); | |
}); | |
+ this.previousTarget = evt.target; | |
} else if (evt.target instanceof HTMLOptionElement && | |
evt.target.parentNode instanceof HTMLSelectElement) { | |
content.setTimeout(function showIMEForSelect() { | |
@@ -124,6 +125,8 @@ | |
options.item(i).selected = (json.indexes.indexOf(i) != -1); | |
} | |
} | |
+ | |
+ target.blur(); | |
break; | |
} | |
}, |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment