Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Side by Side Diff: chrome/content/ui/filters-search.js

Issue 29328828: Issue 3129/3144 - Fixed: Findbar key handling conflicted with filter editing (Closed)
Patch Set: Created Oct. 5, 2015, 10:21 a.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * This file is part of Adblock Plus <https://adblockplus.org/>, 2 * This file is part of Adblock Plus <https://adblockplus.org/>,
3 * Copyright (C) 2006-2015 Eyeo GmbH 3 * Copyright (C) 2006-2015 Eyeo GmbH
4 * 4 *
5 * Adblock Plus is free software: you can redistribute it and/or modify 5 * Adblock Plus is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 3 as 6 * it under the terms of the GNU General Public License version 3 as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
8 * 8 *
9 * Adblock Plus is distributed in the hope that it will be useful, 9 * Adblock Plus is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 43
44 findbar.addEventListener("keypress", function(event) 44 findbar.addEventListener("keypress", function(event)
45 { 45 {
46 // Work-around for bug 490047 46 // Work-around for bug 490047
47 if (event.keyCode == KeyEvent.DOM_VK_RETURN) 47 if (event.keyCode == KeyEvent.DOM_VK_RETURN)
48 event.preventDefault(); 48 event.preventDefault();
49 }, false); 49 }, false);
50 50
51 // Hack to prevent "highlight all" from getting enabled 51 // Hack to prevent "highlight all" from getting enabled
52 findbar.toggleHighlight = function() {}; 52 findbar.toggleHighlight = function() {};
53
54 // Ignore accessibility.typeaheadfind preference to avoid findbar
55 // being opened when interacting with filter tree
56 Object.defineProperty(findbar, "_findAsYouType", {
57 get: () => false,
58 enumerable: true,
59 configurable: true
60 });
Wladimir Palant 2015/10/05 14:17:20 I don't think we need to disable the functionality
Thomas Greiner 2015/10/05 16:45:20 Thanks for the link, I wasn't aware of this implem
53 }, 61 },
54 62
55 /** 63 /**
56 * Performs a text search. 64 * Performs a text search.
57 * @param {String} text text to be searched 65 * @param {String} text text to be searched
58 * @param {Integer} direction search direction: -1 (backwards), 0 (forwards 66 * @param {Integer} direction search direction: -1 (backwards), 0 (forwards
59 * starting with current), 1 (forwards starting with next) 67 * starting with current), 1 (forwards starting with next)
60 * @param {Boolean} caseSensitive if true, a case-sensitive search is perform ed 68 * @param {Boolean} caseSensitive if true, a case-sensitive search is perform ed
61 * @result {Integer} one of the nsITypeAheadFind constants 69 * @result {Integer} one of the nsITypeAheadFind constants
62 */ 70 */
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
265 }, 273 },
266 274
267 sendAsyncMessage: function() {} 275 sendAsyncMessage: function() {}
268 } 276 }
269 }; 277 };
270 278
271 window.addEventListener("load", function() 279 window.addEventListener("load", function()
272 { 280 {
273 FilterSearch.init(); 281 FilterSearch.init();
274 }, false); 282 }, false);
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld