Merge lp:~huwshimi/lazr-js/autocomplete-enter-580404 into lp:lazr-js
Proposed by
Huw Wilkins
Status: | Merged |
---|---|
Approved by: | Huw Wilkins |
Approved revision: | 205 |
Merged at revision: | 204 |
Proposed branch: | lp:~huwshimi/lazr-js/autocomplete-enter-580404 |
Merge into: | lp:lazr-js |
Diff against target: |
15 lines (+4/-1) 1 file modified
src-js/lazrjs/autocomplete/autocomplete.js (+4/-1) |
To merge this branch: | bzr merge lp:~huwshimi/lazr-js/autocomplete-enter-580404 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Brad Crittenden (community) | code | Approve | |
Benji York (community) | code* | Approve | |
Review via email: mp+49351@code.launchpad.net |
Commit message
Pressing enter in an autocomplete field now submits the form when there are no suggestions.
Description of the change
Pressing enter in an autocomplete field now submits the form when there are no suggestions.
TO TEST:
View a bug page. Click the edit button or "Add tags". Type in a tag name. Press ENTER.
The form should submit and the tags will be saved. You used to have to press ENTER twice to get this to happen.
To post a comment you must log in.
s/wat/want
What happens if this.get(QUERY) is actually null? Won't this error? Or maybe that can never happen if ._last_ input_completed is false?
I see this code was already in the keydown method and I'm just a bit curious why it's there. Does it need to happen on keydown to stop the default behaviour happening?