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

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

Issue 5166222576451584: Issue 2264 - Remove deprecated logic from Utils.runAsync() on Firefox (Closed)
Patch Set: Created April 2, 2015, 10:16 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 | « chrome/content/ui/filters.xul ('k') | chrome/content/ui/filters-subscriptionactions.js » ('j') | 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 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 break; 120 break;
121 121
122 // Select subscription in its list and restore focus after that 122 // Select subscription in its list and restore focus after that
123 let oldFocus = document.commandDispatcher.focusedElement; 123 let oldFocus = document.commandDispatcher.focusedElement;
124 E("tabs").selectedIndex = (subscription instanceof SpecialSubscription ? 1 : 0); 124 E("tabs").selectedIndex = (subscription instanceof SpecialSubscription ? 1 : 0);
125 list.ensureElementIsVisible(node); 125 list.ensureElementIsVisible(node);
126 list.selectItem(node); 126 list.selectItem(node);
127 if (oldFocus) 127 if (oldFocus)
128 { 128 {
129 oldFocus.focus(); 129 oldFocus.focus();
130 Utils.runAsync(oldFocus.focus, oldFocus); 130 Utils.runAsync(() => oldFocus.focus());
131 } 131 }
132 132
133 Utils.runAsync(findText, null, text, direction, direction == 1 ? -1 : subscription.filters.length); 133 Utils.runAsync(() => findText(text, direction, direction == 1 ? -1 : subscription.filters.length));
134 return result; 134 return result;
135 } 135 }
136 } 136 }
137 } 137 }
138 138
139 return Ci.nsITypeAheadFind.FIND_NOTFOUND; 139 return Ci.nsITypeAheadFind.FIND_NOTFOUND;
140 } 140 }
141 }; 141 };
142 142
143 /** 143 /**
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
230 { 230 {
231 E("filtersTree").boxObject.scrollByPages(num); 231 E("filtersTree").boxObject.scrollByPages(num);
232 }, 232 },
233 } 233 }
234 }; 234 };
235 235
236 window.addEventListener("load", function() 236 window.addEventListener("load", function()
237 { 237 {
238 FilterSearch.init(); 238 FilterSearch.init();
239 }, false); 239 }, false);
OLDNEW
« no previous file with comments | « chrome/content/ui/filters.xul ('k') | chrome/content/ui/filters-subscriptionactions.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld