Skip to content

Commit

Permalink
Attempt to solve #11 issue, but without luck. After all, is good
Browse files Browse the repository at this point in the history
code to avoid another de-synchronizations.
  • Loading branch information
IagoSRL committed Dec 20, 2011
1 parent 50a424d commit f9a3574
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions chrome/content/unifiedsearch.js
Original file line number Diff line number Diff line change
Expand Up @@ -849,6 +849,18 @@ var unifiedsearch = {
document.getElementById('qfb-tags').setAttribute('accesskey', document.getElementById('us-filter-tags-shortcut').value);
document.getElementById('qfb-attachment').setAttribute('accesskey', document.getElementById('us-filter-attachment-shortcut').value);
},
replaceQFBoxClearSearch: function() {
if (!this.qfbox) return;
this.qfbox.originalClearSearch = this.qfbox._clearSearch;
this.qfbox.clearSearch = function() {
// Do the original stuff
let ret = this.originalClearSearch();
if (ret)
// Reset USWidget filter too, to mantain in synchro:
unifiedsearch.resetUSWFilter();
return ret;
}
},
/* This function will check if something filter text must be copied from the filter box to the search box,
to maintain the default TB behavior that preserve the last filter text when TB is closed,
this is needed when: filtering in search box is enabled AND user is not in the search box.
Expand Down Expand Up @@ -1197,6 +1209,7 @@ var unifiedsearch = {
this.configureHideFilterBox();
this.configureHideFilterBar();
this.configureShortcutsQFBox();
this.replaceQFBoxClearSearch();
}
},

Expand Down

0 comments on commit f9a3574

Please sign in to comment.