jquery.suggestions, mediawiki.searchSuggest: Fix form submission
authorBartosz Dziewoński <matma.rex@gmail.com>
Sat, 22 Feb 2014 16:07:01 +0000 (17:07 +0100)
committerYuvipanda <yuvipanda@gmail.com>
Mon, 24 Feb 2014 15:25:30 +0000 (15:25 +0000)
commitd97a7d33882dc3bb3f43c84b9719a33dae4d8224
tree950eecbb7003906ccd3bd6511c157163baf35f63
parent4042fabd87baaed19c8b58a4b3002cc71eac1923
jquery.suggestions, mediawiki.searchSuggest: Fix form submission

Don't override form submission behavior (by capturing the Enter key on
search box, preventing default behavior, and then manually submitting
the form); just let it happen if it's wanted.

Then swap out a few unjustified stopImmediatePropagation() calls to
stopPropagation() so that the event can be actually fired. Add some
comments while we're at it.

This allows the user to use Ctrl+Enter (or Shift+Enter) to submit the
form into a new tab (or new window) on browsers that support this
(currently Opera and Chrome).

Bug: 34756
Bug: 35974
Change-Id: I49ef7cc89400032505bc444f21d522d5b5d47586
resources/jquery/jquery.suggestions.js
resources/mediawiki/mediawiki.searchSuggest.js