Closed
Bug 1070895
Opened 11 years ago
Closed 11 years ago
Pressing ENTER in search box clears search and returns back to inbox
Categories
(Firefox OS Graveyard :: Gaia::E-Mail, defect)
Tracking
(blocking-b2g:-, b2g-v2.1 fixed, b2g-v2.2 fixed)
People
(Reporter: janjongboom, Assigned: janjongboom)
References
Details
Attachments
(2 files)
1. Open the e-mail client
2. Scroll up
3. Type search term
4. Press ENTER to exec search term and dismiss keyboard
5. Back in inbox again
6. &*#$&#*$&(
On Flame 2.0 & 2.2
Assignee | ||
Comment 1•11 years ago
|
||
So this is what happens:
- The UI element for 'Cancel' is in the wrong place. It should not be top corner because none of our back/cancel elements are there. Because you need to style it there type="submit" is added on here.
- When pressing enter we submit the form, therefore the onCancelSearch function is called, which starts playing animation sometimes
- The form does not receive a preventDefault() from cancelSearch and has no action so it submits to itself, refreshing the app
- Last shown inbox is shown
I fixed it so the UI stays the same, but we should move the Cancel button to the left as well.
Assignee: nobody → janjongboom
Attachment #8493091 -
Flags: review?(jrburke)
Assignee | ||
Comment 2•11 years ago
|
||
[Blocking Requested - why for this release]: Searching is almost impossible in the email client. Keyboard does not dismiss, and pressing Enter clears all state in the app.
blocking-b2g: --- → 2.0?
Comment 3•11 years ago
|
||
Comment on attachment 8493091 [details] [review]
Patch
Great find, thanks for doing a patch!
By fixing this, it uncovers an issue with autocorrect, and I would like to see a baseline "submit" listener in place just so we can properly cancel form submission if the submit pathways change in the future.
I will attach a new pull request since I ended up doing the other changes in the progress of reviewing this patch. So I will obsolete this patch, but only because the existing email code was deficient in other ways that were only found once the fix in this patch fixed the form preventDefault.
Attachment #8493091 -
Flags: review?(jrburke)
Comment 4•11 years ago
|
||
This issue was caused by the changes in bug 1001298, and as noted in :janjongboom's excellent investigation into the issue, the type="submit" on the Cancel form is just semantically incorrect.
I filed bug 1071408 against the input_areas.css as this is a shared style and layout for a search area, also used in Contacts, and it is best for it be fixed there long term.
If the Cancel button should be on the different side of the search field, that fix would also make sense as part of bug 1071408, but I leave it to the building block owners to determine that.
However, even with a fix to the type="submit" on the Cancel, we should still do the changes in this pull request:
* Makes sure a 'submit' listener is in place to stop accidental form submissions (usually by the Enter button on keyboard) from trying to submit the form. This will give us protection if the building block moves away from type="submit" or some other submit pathway shows up later.
* For the click handler for Cancel, make sure it is a real Cancel click and not a simulated one from a submit action.
* Turn off autocorrect for the search input. Now that the Enter button does not destroy the card, the text being autocorrected by the keyboard on Enter.
So, this will give is a good path forward if that form structure changes, and if this is approved for 2.1, allows us to work with the weird type="submit" in that branch.
Tested on flame device.
Attachment #8493529 -
Flags: review?(bugmail)
Comment 5•11 years ago
|
||
Comment on attachment 8493529 [details] [review]
GitHub pull request
Thanks very much for making the effort to both file the bug and provide a fix, Jan! I know how frustrating these things can be and it's awesome that you are able to help address these problems directly! Maybe the reason I don't recognize the curse word pattern in STR6 is that it's a very restrained curse word! ;)
Thanks very much James for the expanded comments and investigation plus spin-offs. minor nit on also including "inputmode" in addition to x-inputmode.
Attachment #8493529 -
Flags: review?(bugmail) → review+
Comment 6•11 years ago
|
||
Merge from master:
https://github.com/mozilla-b2g/gaia/commit/9b6a40245221138dac945e1c1724742c5ce16d6c
from pull request:
https://github.com/mozilla-b2g/gaia/pull/24321
Includes inputmode suggestion from review.
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Comment 7•11 years ago
|
||
This change is likely easy to uplift to 2.0, and is low risk. I may need to do a special pull request for it, but there is a good change it will just auto-uplift via a cherrypick.
As to the severity of the issue: search is usable, as long as the user does not tap the Enter button on the keyboard. The search results view is just a bit short since the keyboard is up. That search area is scrollable though with the keyboard up.
It will be surprising to the user if they tap Enter though. One of the reasons I did not catch this before because I just do not press enter when I have used search, but rather did the search and refined it until I saw the email I was looking for or scrolled then tapped, without closing the keyboard via Enter.
To be clear, I would prefer to have this fixed on the branches for robustness, and I am happy to turn around any special changesets to get it uplifted to 2.0, 2.1, if auto uplift does not work. Just giving more context as to the scope of the issue. If for some reason 2.0 is not approved, this should definitely go to 2.1.
Comment 8•11 years ago
|
||
triage: Because the search function does work (just maybe not quite how you expect it to), this one does not fit the criteria for blocking, especially on 2.0 at this point. Let's request approval for 2.1 uplift.
blocking-b2g: 2.0? → -
Flags: needinfo?(jrburke)
Comment 9•11 years ago
|
||
Comment on attachment 8493529 [details] [review]
GitHub pull request
[Bug caused by] (feature/regressing bug #):
Bug 1001298
[User impact] if declined:
Pressing Enter on the search form destroys the search card and returns the user to the message list.
[Testing completed]:
Tested on flame device.
[Risk to taking this patch] (and alternatives if risky):
Very low. As the form event handling is more robust, it decreases risk in the future if the submit pathways are changed.
[String changes made]:
none
Attachment #8493529 -
Flags: approval-gaia-v2.1?
Flags: needinfo?(jrburke)
Updated•11 years ago
|
Attachment #8493529 -
Flags: approval-gaia-v2.1? → approval-gaia-v2.1+
Comment 10•11 years ago
|
||
Comment 11•11 years ago
|
||
[Environment]
Gaia-Rev 13973ab50760d1e8bb773082163f0dff19d35a44
Gecko-Rev https://hg.mozilla.org/releases/mozilla-aurora/rev/6e317e075d04
Build-ID 20140928160204
Version 34.0a2
Device-Name flame
FW-Release 4.4.2
FW-Incremental eng.cltbld.20140925.192608
FW-Date Thu Sep 25 19:26:18 EDT 2014
Bootloader L1TC10011800
[Result]
PASS
Status: RESOLVED → VERIFIED
Updated•11 years ago
|
QA Whiteboard: [COM=Gaia::E-Mail]
OS: Mac OS X → Gonk (Firefox OS)
Hardware: x86 → ARM
You need to log in
before you can comment on or make changes to this bug.
Description
•