Bug 850673 - Prevent triggering selection attachment when the user clicks rapidly on the find bar navigation buttons. r=mbrubeck

This commit is contained in:
Jim Mathies 2013-03-29 06:50:48 -05:00
Родитель e562d58411
Коммит 2341f8120b
2 изменённых файлов: 13 добавлений и 2 удалений

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

@ -14,6 +14,14 @@ var FindHelperUI = {
_open: false,
_status: null,
/*
* Properties
*/
get isActive() {
return this._open;
},
get status() {
return this._status;
},
@ -94,9 +102,12 @@ var FindHelperUI = {
},
show: function findHelperShow() {
// Hide any menus
ContextUI.dismiss();
// Shutdown selection related ui
SelectionHelperUI.closeEditSession();
this._container.show(this);
this.search(this._textbox.value);
this._textbox.select();

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

@ -146,7 +146,7 @@ var TouchModule = {
// once we get omtc and the apzc. Currently though dblclick is delivered to
// content and triggers selection of text, so fire up the SelectionHelperUI
// once selection is present.
if (!SelectionHelperUI.isActive) {
if (!SelectionHelperUI.isActive && !FindHelperUI.isActive) {
setTimeout(function () {
SelectionHelperUI.attachEditSession(Browser.selectedTab.browser,
aEvent.clientX, aEvent.clientY);