Commit d89c2ca6 authored by engedy@chromium.org's avatar engedy@chromium.org

Take care not to destroy a multi-selection when a child element of a list item receives focus.

BUG=398862

Review URL: https://codereview.chromium.org/429073006

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@287162 0039d316-1c4b-4281-b951-d872f2087c98
parent d3ff501b
...@@ -92,6 +92,13 @@ cr.define('options', function() { ...@@ -92,6 +92,13 @@ cr.define('options', function() {
* @private * @private
*/ */
handleFocus_: function() { 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 list = this.parentNode;
var index = list.getIndexOfListItem(this); var index = list.getIndexOfListItem(this);
list.selectionModel.selectedIndex = index; list.selectionModel.selectedIndex = index;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment