Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(7)

Unified Diff: chrome/browser/resources/shared/js/cr/ui/list_selection_controller.js

Issue 10646002: Revert 143362 - Merge 142936 - Click on empty space clears selection in single selection list on Ma… (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1180/src/
Patch Set: Created 8 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/shared/js/cr/ui/list_selection_controller.js
===================================================================
--- chrome/browser/resources/shared/js/cr/ui/list_selection_controller.js (revision 143397)
+++ chrome/browser/resources/shared/js/cr/ui/list_selection_controller.js (working copy)
@@ -129,9 +129,10 @@
// On Mac we always clear the selection if the user clicks a blank area.
// On Windows, we only clear the selection if neither Shift nor Ctrl are
// pressed.
- if (cr.isMac || cr.isChromeOS) {
+ if (cr.isMac) {
sm.leadIndex = sm.anchorIndex = -1;
- sm.unselectAll();
+ if (sm.multiple)
+ sm.unselectAll();
} else if (!isDown && !e.shiftKey && !e.ctrlKey)
// Keep anchor and lead indexes. Note that this is intentionally
// different than on the Mac.
@@ -263,7 +264,7 @@
} else {
sm.selectRange(anchorIndex, newIndex);
}
- } else if (e.ctrlKey && !cr.isMac && !cr.isChromeOS) {
+ } else if (e.ctrlKey && !cr.isMac) {
// Setting the lead index is done above.
// Mac does not allow you to change the lead.
} else {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698