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

Unified Diff: chrome/browser/resources/options/deletable_item_list.js

Issue 429073006: Take care not to destroy a multi-selection when a child element of a list item receives focus. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed comments. Created 6 years, 5 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/options/deletable_item_list.js
diff --git a/chrome/browser/resources/options/deletable_item_list.js b/chrome/browser/resources/options/deletable_item_list.js
index d625dc5a7ca705e0e27b6957a40019c28818e22a..2fbf9984534800f12d624ab95c569eed3498b862 100644
--- a/chrome/browser/resources/options/deletable_item_list.js
+++ b/chrome/browser/resources/options/deletable_item_list.js
@@ -92,6 +92,13 @@ cr.define('options', function() {
* @private
*/
handleFocus_: function() {
+ // This handler is also fired when the child receives focus as a result of
+ // the item getting selected by the customized mouse/keyboard handling in
+ // SelectionController. Take care not to destroy a potential multiple
+ // selection in this case.
+ if (this.selected)
+ return;
+
var list = this.parentNode;
var index = list.getIndexOfListItem(this);
list.selectionModel.selectedIndex = index;
« 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