Bmansurov has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/291738

Change subject: Beta: Submit the search form when the 'enter' key is hit
......................................................................

Beta: Submit the search form when the 'enter' key is hit

Move the 'clear' button outside the form so that hitting the
'enter' key inside the search box does not trigger a `click` on
the button, rather submits the form.

Bug: T136243
Change-Id: Icea026ffa3aea6ab20905268ff924fe8cf1d4d24
---
M resources/mobile.search/header.hogan
1 file changed, 2 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend 
refs/changes/38/291738/1

diff --git a/resources/mobile.search/header.hogan 
b/resources/mobile.search/header.hogan
index 863c985..e8b585c 100644
--- a/resources/mobile.search/header.hogan
+++ b/resources/mobile.search/header.hogan
@@ -4,8 +4,9 @@
 <div class="overlay-title">
        <form method="get" action="{{action}}" class="search-box">
                <input class="search" type="search" name="search" 
autocomplete="off" placeholder="{{placeholderMsg}}" value="{{searchTerm}}">
-               {{#isBeta}}{{#clearIcon}}{{>icon}}{{/clearIcon}}{{/isBeta}}
        </form>
+       {{! See: T136243. Do not put the clear button inside the form as 
hitting enter on the input element triggers a button click, rather than 
submitting the form. }}
+       {{#isBeta}}{{#clearIcon}}{{>icon}}{{/clearIcon}}{{/isBeta}}
 </div>
 {{^isBeta}}
 <ul>

-- 
To view, visit https://gerrit.wikimedia.org/r/291738
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Icea026ffa3aea6ab20905268ff924fe8cf1d4d24
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Bmansurov <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to