summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authorarv@chromium.org <arv@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-29 20:32:00 +0000
committerarv@chromium.org <arv@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-29 20:32:00 +0000
commitc742485e83175e8cdb74e3b44a871e85bff79042 (patch)
treeeac5bda9b88cdb3523f18dc105db0d16b72787e3 /chrome
parent842ad85cac86edad3036a20d8680de63f00bcb7c (diff)
downloadchromium_src-c742485e83175e8cdb74e3b44a871e85bff79042.zip
chromium_src-c742485e83175e8cdb74e3b44a871e85bff79042.tar.gz
chromium_src-c742485e83175e8cdb74e3b44a871e85bff79042.tar.bz2
Bookmarks: Fix Cmd+A on Mac
BUG=47241 TEST=Navigate between a few folders and then click on the right pane. Now hit Cmd+A. Review URL: http://codereview.chromium.org/2832034 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@51155 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r--chrome/browser/resources/shared/js/cr/ui/list_selection_model.js12
1 files changed, 10 insertions, 2 deletions
diff --git a/chrome/browser/resources/shared/js/cr/ui/list_selection_model.js b/chrome/browser/resources/shared/js/cr/ui/list_selection_model.js
index a95ac4c..9ed0c0a 100644
--- a/chrome/browser/resources/shared/js/cr/ui/list_selection_model.js
+++ b/chrome/browser/resources/shared/js/cr/ui/list_selection_model.js
@@ -134,7 +134,7 @@ cr.define('cr.ui', function() {
// On Windows, we only clear the selection if neither Shift nor Ctrl are
// pressed.
if (cr.isMac) {
- this.clear();
+ this.clear_();
} else if (!isDown && !e.shiftKey && !e.ctrlKey)
// Keep anchor and lead indexes. Note that this is intentionally
// different than on the Mac.
@@ -338,9 +338,17 @@ cr.define('cr.ui', function() {
clear: function() {
this.beginChange_();
this.length_ = 0;
+ this.clear_();
+ this.endChange_();
+ },
+
+ /**
+ * Clears all selected as well as the lead and anchor index.
+ * @private
+ */
+ clear_: function() {
this.anchorIndex = this.leadIndex = -1;
this.clearAllSelected_();
- this.endChange_();
},
/**