Bug 1071631 - fix findbar re-filling in last character, r=mikedeboer

--HG--
extra : commitid : 3KDFc8SayaU
extra : rebase_source : 01e8ca9fdcf52e3380ef4b634d1134e9a83ad422
This commit is contained in:
Gijs Kruitbosch 2015-10-19 21:20:29 +01:00
Родитель 5da6b02777
Коммит 182520fa90
1 изменённых файлов: 11 добавлений и 1 удалений

Просмотреть файл

@ -74,6 +74,14 @@
if (this.findbar._isIMEComposing) {
return;
}
if (this._hadValue && !this.value) {
this._willfullyDeleted = true;
this._hadValue = false;
} else if (this.value.trim()) {
this._hadValue = true;
this._willfullyDeleted = false;
}
this.findbar._find(this.value);
]]></handler>
@ -1101,8 +1109,10 @@
return;
let clipboardSearchString = this._browser.finder.clipboardSearchString;
if (clipboardSearchString && this._findField.value != clipboardSearchString) {
if (clipboardSearchString && this._findField.value != clipboardSearchString &&
!this._findField._willfullyDeleted) {
this._findField.value = clipboardSearchString;
this._findField._hadValue = true;
// Changing the search string makes the previous status invalid, so
// we better clear it here.
this._updateStatusUI();