Index: ui/webui/resources/js/cr/ui/focus_manager.js |
diff --git a/ui/webui/resources/js/cr/ui/focus_manager.js b/ui/webui/resources/js/cr/ui/focus_manager.js |
index 3d2fac9020bac4467bbf4e9814bd34582cad3d63..2142efd2ee75392600a4e7ec4df512c880390c55 100644 |
--- a/ui/webui/resources/js/cr/ui/focus_manager.js |
+++ b/ui/webui/resources/js/cr/ui/focus_manager.js |
@@ -194,38 +194,6 @@ cr.define('cr.ui', function() { |
}, |
}; |
- /** |
- * Disable mouse-focus for button controls. |
- * Button form controls are mouse-focusable since Chromium 30. We want the |
- * old behavior in some WebUI pages. |
- */ |
- FocusManager.disableMouseFocusOnButtons = function() { |
- document.addEventListener('mousedown', function(event) { |
- if (event.defaultPrevented) |
- return; |
- var node = event.target; |
- var tagName = node.tagName; |
- if (tagName != 'BUTTON' && tagName != 'INPUT') { |
- do { |
- node = node.parentNode; |
- if (!node || node.nodeType != Node.ELEMENT_NODE) |
- return; |
- } while (node.tagName != 'BUTTON'); |
- } |
- var type = node.type; |
- if (type == 'button' || type == 'reset' || type == 'submit' || |
- type == 'radio' || type == 'checkbox') { |
- if (document.activeElement != node) |
- document.activeElement.blur(); |
- |
- // Focus the current window so that if the active element is in another |
- // window, it is deactivated. |
- window.focus(); |
- event.preventDefault(); |
- } |
- }, false); |
- }; |
- |
return { |
FocusManager: FocusManager, |
}; |