summaryrefslogtreecommitdiffstats
path: root/ui/webui
diff options
context:
space:
mode:
authorarv@chromium.org <arv@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-10-16 14:36:30 +0000
committerarv@chromium.org <arv@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-10-16 14:36:30 +0000
commitf68610a2abca68349dc770ab6288559c293a4523 (patch)
tree2a811653d4f9d29ea8e47c5efcddc68f832d9eb8 /ui/webui
parenta1406cb0281a5233a5f1291bfe0f937ab1773e08 (diff)
downloadchromium_src-f68610a2abca68349dc770ab6288559c293a4523.zip
chromium_src-f68610a2abca68349dc770ab6288559c293a4523.tar.gz
chromium_src-f68610a2abca68349dc770ab6288559c293a4523.tar.bz2
WebUI: Fix issue with context menu button stealing focus from list
This regressed in r25605004 When the user mousedown on the context menu button we used to call preventDefault on the event. With r25605004 we unconditionally call focus on the button. Now we do not call focus on elements if preventDefault was called. BUG=307386 R=tkent@chromium.org Review URL: https://codereview.chromium.org/26997003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@228914 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/webui')
-rw-r--r--ui/webui/resources/js/cr/ui/list.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/ui/webui/resources/js/cr/ui/list.js b/ui/webui/resources/js/cr/ui/list.js
index 5ed87f5..ccb311e 100644
--- a/ui/webui/resources/js/cr/ui/list.js
+++ b/ui/webui/resources/js/cr/ui/list.js
@@ -1284,6 +1284,10 @@ cr.define('cr.ui', function() {
*/
function handleMouseDown(e) {
this.handlePointerDownUp_(e);
+
+ if (e.defaultPrevented)
+ return;
+
// If non-focusable area in a list item is clicked and the item still
// contains the focused element, the item did a special focus handling
// [1] and we should not focus on the list.