Closed
Bug 1419724
Opened 7 years ago
Closed 7 years ago
The autofill'ed text will be removed after pressing ESC key
Categories
(Toolkit :: Form Autofill, defect, P2)
Toolkit
Form Autofill
Tracking
()
VERIFIED
FIXED
mozilla59
People
(Reporter: lchang, Assigned: ralin)
References
(Blocks 2 open bugs)
Details
(Whiteboard: [form autofill:MVP])
Attachments
(2 files)
59 bytes,
text/x-review-board-request
|
MattN
:
review+
|
Details |
2.85 KB,
patch
|
gchang
:
approval-mozilla-beta+
|
Details | Diff | Splinter Review |
It affects both address and credit card autofill. [Steps:] 0. Ensure there is at least one address record saved 1. Open demo page https://luke-chang.github.io/autofill-demo/basic.html 2. Focus one of the fields that can trigger autofill dropdown 3. Click the field again to trigger the dropdown 4. Select any profile from dropdown to autofill 5. Press ESC key [Actual Result:] The autofill'ed text has been removed. [Expected Result:] Nothing should happen.
Comment hidden (mozreview-request) |
Assignee | ||
Comment 3•7 years ago
|
||
The patch in comment 2 is a workaround, I'd like to seek for other appropriate fix to the underlying problem. If no feasible approach can be done by 58, then we go the workaround.
Assignee | ||
Comment 4•7 years ago
|
||
To decrypt the data in the runtime which requires master password from user's input, e.g. credit card number, we have to by pass the autocomplete EnterMatch()[0][1] and fill-in the decrypted value by ourself in asynchronous way right afterwards. So the mSearchString in AutocompleteController would become inconsistent with the real filled value. In this case, the mSearchString remains empty even after the form is populated by form autofill, hence, pressing ESC would revert the value of focused input to empty according to empty mSearchString. [0] https://searchfox.org/mozilla-central/rev/33c90c196bc405e628bc868a4f4ba29b992478c0/browser/extensions/formautofill/ProfileAutoCompleteResult.jsm#98-111 [1] https://searchfox.org/mozilla-central/rev/33c90c196bc405e628bc868a4f4ba29b992478c0/browser/extensions/formautofill/FormAutofillHandler.jsm#394
Assignee | ||
Comment 5•7 years ago
|
||
Hi Marco, Could you give us some feedback about the workaround in comment 2? It might be a bit hacky to manipulate the "searchString" directly, but I couldn't come up with better way to fix the problem unless EnterMatch() can adapt asynchronous value. Thanks.
Flags: needinfo?(mak77)
Comment 6•7 years ago
|
||
At first glance, you could use the onTextReverted handler on the input binding, if you implement it and make it return false when the text should not be reverted, it may solve your troubles (provided the problem is HandleEscape). I'm not sure how complex that is from content though, I didn't work much with e10s autocomplete. Btw, there's nothing wrong with updating the searchString if it's out of sync for some reason, but I don't know your code well enough to tell if it fits your case. MattN could have more knowledge in this area.
Flags: needinfo?(mak77)
Comment hidden (mozreview-request) |
Assignee | ||
Comment 8•7 years ago
|
||
(In reply to Marco Bonardo [::mak] from comment #6) > At first glance, you could use the onTextReverted handler on the input > binding, if you implement it and make it return false when the text should > not be reverted, it may solve your troubles (provided the problem is > HandleEscape). I'm not sure how complex that is from content though, I > didn't work much with e10s autocomplete. > > Btw, there's nothing wrong with updating the searchString if it's out of > sync for some reason, but I don't know your code well enough to tell if it > fits your case. MattN could have more knowledge in this area. Thank you Marco, that's helpful! We'll try to update searchString first. If we keep the searchString synced, I guess we don't need to worry about other operations like text revert anyways.
Assignee | ||
Comment 9•7 years ago
|
||
Hi Matt, Could you help review is the searchString updating reasonable? Thanks
Assignee: nobody → ralin
Status: NEW → ASSIGNED
Comment 10•7 years ago
|
||
mozreview-review |
Comment on attachment 8931220 [details] Bug 1419724 - Explicitly make searchString consistent with autocompleteController as form autofill goes different route to fill the value. https://reviewboard.mozilla.org/r/202328/#review208724 I don't see any problems off-hand but I think we should have tests in this bug for this somewhat obscure behaviour.
Attachment #8931220 -
Flags: review?(MattN+bmo) → review+
Comment hidden (mozreview-request) |
Assignee | ||
Comment 12•7 years ago
|
||
(In reply to Matthew N. [:MattN] (PM if requests are blocking you) from comment #10) > Comment on attachment 8931220 [details] > Bug 1419724 - Explicitly make searchString consistent with > autocompleteController as form autofill goes different route to fill the > value. > > https://reviewboard.mozilla.org/r/202328/#review208724 > > I don't see any problems off-hand but I think we should have tests in this > bug for this somewhat obscure behaviour. Thank you Matt! Test added, and TH result looks good: https://treeherder.mozilla.org/#/jobs?repo=try&revision=e60d88c74f171c4d1866d9af7abd2073601f62f2 , let's land it.
Comment 13•7 years ago
|
||
Pushed by ralin@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/4d7297509f5f Explicitly make searchString consistent with autocompleteController as form autofill goes different route to fill the value. r=MattN
Comment 14•7 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/4d7297509f5f
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla59
Comment 15•7 years ago
|
||
bugherder landing |
https://hg.mozilla.org/integration/mozilla-inbound/rev/4d7297509f5f
Assignee | ||
Comment 16•7 years ago
|
||
Approval Request Comment [Feature/Bug causing the regression]: Autocomplete keyboard accessibility [User impact if declined]: as comment 0 mentioned, user would unexpectedly erase the filled value by pressing ESC [Is this code covered by automated tests?]: yes [Has the fix been verified in Nightly?]: no [Needs manual test from QE? If yes, steps to reproduce]: yes, see STR in comment 0 [List of other uplifts needed for the feature/fix]: none [Is the change risky?]: low [Why is the change risky/not risky?]: only update the searchString, doesn't affect the main logic of any [String changes made/needed]: none Thanks!!
Attachment #8934415 -
Flags: approval-mozilla-beta?
Updated•7 years ago
|
Comment 17•7 years ago
|
||
Comment on attachment 8934415 [details] [diff] [review] Beta-Bug-1419724-Explicitly-make-searchString-consistent.patch To avoid unexpectedly erasing the filled value by pressing ESC issue. Beta58+.
Attachment #8934415 -
Flags: approval-mozilla-beta? → approval-mozilla-beta+
Updated•7 years ago
|
Flags: qe-verify+
Comment 18•7 years ago
|
||
bugherder uplift |
https://hg.mozilla.org/releases/mozilla-beta/rev/62323bdb968a
Comment 19•7 years ago
|
||
Reproduced the issue using Nightly (2017-11-22) on Windows 10 x64. Verified fixed using the latest Nightly 59.0a1 (2017-12-12)on Windows 10 x64, Ubuntu 16.04 x64 and Mac OS X 10.12
Comment 20•7 years ago
|
||
I have managed to reproduce the issue mentioned in comment 0 using Firefox 59.0a1 (BuildId:20171122220056). This issue is no longer reproducible using Firefox 58.0b11 (BuildId:20171211020921) on Windows 10 64bit, macOS 10.13 and Ubuntu 16.04 64bit.
You need to log in
before you can comment on or make changes to this bug.
Description
•