mozilla-b2g/gaia — pull request #5324 by benfrancis (2012-09-27 18:41:29+00:00)
Title: [Browser] Go/search button, closes #5099

This patch implements the idea proposed in #5099 following a discussion in #4075 about making it more obvious how to search the web from the browser. @dietrich pointed out that it's not currently very obvious, #4075 goes some way to helping with this, but this patch goes further.

As the user types the browser displays either a go button or a search button depending on whether the currently entered text is a valid URL. The important thing here is adding a search button, but it looks kind of odd if you don't also have a go button when the search button isn't displayed. However, the go button is a bit of a controversial use of space.

@lco would like to make the final call on this once she's seen it on the device so if it doesn't work out, we can back it out.

Note: I've also simplified the event handling and stopped us from updating the awesomescreen on every key press regardless of where you are in the app which we shouldn't be doing.