gecko-dev/toolkit
Masayuki Nakano 169354c54c Bug 1407085 - nsAutoCompleteController shouldn't restore original value after somebody changes the input value even when Escape key is pressed r=mak
When Escape key is pressed, nsAutoCompleteController needs to restore last
string which was default value of the input or typed by the user.  However,
somebody may change the value, e.g., an event listener which handles
Escape key.  In this case, nsAutoCompleteController shouldn't restore the
last string.

Unfortunately, when JS sets input value, DOM "input" event won't be fired.
Therefore, nsAutoCompleteController doesn't have a chance to modify
mSearchString in this case.  Therefore, nsAutoCompleteController needs to
store expected input string for checking if somebody modified the input value.
For solving this issue, this patch adds a new member, mSetValue which is
modified when the input value is modified by nsAutoCompleteController itself
or mSearchString is modified.

Even with this patch, if user temporarily selects an item of the popup and
JS sets same value as the selected item from JS, nsAutoCompleteController
restores the input value with mSearchString.  However, this must be rare
case and I don't have idea to fix this issue with simple patches.

MozReview-Commit-ID: lig8c7xvD7

--HG--
extra : rebase_source : 787dbfb35bc70d27fb09ec93861164e7a5165be3
2017-12-19 16:46:20 +09:00
..
components Bug 1407085 - nsAutoCompleteController shouldn't restore original value after somebody changes the input value even when Escape key is pressed r=mak 2017-12-19 16:46:20 +09:00
content Bug 1407085 - nsAutoCompleteController shouldn't restore original value after somebody changes the input value even when Escape key is pressed r=mak 2017-12-19 16:46:20 +09:00
crashreporter Bug 1426090 - Use minidump type 'MiniDumpWithIndirectlyReferencedMemory' for nightly on Windows. r=ted 2018-01-03 16:06:11 +08:00
forgetaboutsite Bug 1421992 - Hand written cleanup patch to make tests pass after removing obsolete xpcshell functions. r=Gijs,ochameau a=Aryx 2017-12-21 11:11:57 +01:00
library Bug 1423469 - update mp4 rust parser. r=kinetik 2018-01-05 11:11:06 +08:00
locales Bug 1424171: Allow passing defines to compare-locales; r=Pike,ted 2017-12-11 14:53:03 -07:00
modules Backed out changeset 3a55b10a6974 (bug 106327) for build bustage on 2018-01-05 04:46:46 +02:00
mozapps Bug 1428401 - Remove obsolete getPref helpers, r=Gijs. 2018-01-06 00:25:51 +01:00
pluginproblem Bug 1409148 - Add dynamic sizing on the plugin overlay. r=dthayer,johannh 2017-11-10 14:05:04 -02:00
profile Bug 1417940 - Change various instances of manually calling getService to use Services.jsm in toolkit/. r=mossop 2017-11-09 16:36:57 +00:00
system Bug 1297686 - List GIO handlers in the protocol handler list, in the handlers dialog, and in preferences. r=paolo 2017-12-29 07:27:42 +00:00
themes merge mozilla-central to mozilla-inbound. r=merge a=merge 2018-01-06 01:56:19 +02:00
xre Bug 1428772 - Report the process type when pausing a child process on startup for debugging. r=froydnj 2018-01-08 09:23:49 -05:00
.eslintrc.js Bug 1421968 - Enable ESLint rule mozilla/use-services by default, but whitelist it for various directories still to be fixed. r=mossop 2017-11-28 19:24:12 +00:00
moz.build Bug 1423416 - Remove updatecommon-standalone. r=ted 2017-12-06 10:47:15 +09:00
moz.configure Bug 1378200 - Remove MOZ_PERMISSIONS define guards. r=mystor 2017-12-14 03:32:41 +05:30
nss.configure
toolkit.mozbuild Bug 1378200 - Remove MOZ_PERMISSIONS define guards. r=mystor 2017-12-14 03:32:41 +05:30