Chromium Code Reviews| Index: chrome/browser/resources/md_history/history_item.js |
| diff --git a/chrome/browser/resources/md_history/history_item.js b/chrome/browser/resources/md_history/history_item.js |
| index 3ece41158a275254a9ce1c6082bfbcd9587f5850..b0f869a6ddc0b47eb4c11a3477151bad63004093 100644 |
| --- a/chrome/browser/resources/md_history/history_item.js |
| +++ b/chrome/browser/resources/md_history/history_item.js |
| @@ -37,14 +37,25 @@ cr.define('md_history', function() { |
| /** |
| * When a history-item is selected the toolbar is notified and increases |
| * or decreases its count of selected items accordingly. |
| + * @param {MouseEvent} e |
| * @private |
| */ |
| - onCheckboxSelected_: function() { |
| + onCheckboxSelected_: function(e) { |
| // TODO(calamity): Fire this event whenever |selected| changes. |
| this.fire('history-checkbox-select', { |
| element: this, |
| - countAddition: this.$.checkbox.checked ? 1 : -1 |
| + shiftKey: e.shiftKey, |
| }); |
| + e.preventDefault(); |
| + }, |
| + |
| + /* |
| + * @param {MouseEvent} e |
| + * @private |
| + */ |
| + onCheckboxMousedown_: function(e) { |
| + // Prevent shift clicking a checkbox from selecting text. |
| + e.preventDefault(); |
|
tsergeant
2016/08/15 04:49:50
You should probably only preventDefault when shift
calamity
2016/08/15 07:18:40
Done.
|
| }, |
| /** |