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

Unified Diff: lib/src/iron-behaviors/iron-button-state.html

Issue 1418513006: update elements and fix some bugs (Closed) Base URL: git@github.com:dart-lang/polymer_elements.git@master
Patch Set: code review updates Created 5 years, 2 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 | « lib/src/iron-autogrow-textarea/test/basic.html ('k') | lib/src/iron-behaviors/test/active-state.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/iron-behaviors/iron-button-state.html
diff --git a/lib/src/iron-behaviors/iron-button-state.html b/lib/src/iron-behaviors/iron-button-state.html
index 96a2bfa9f80c53444debc031634f63aa3e65980b..28cdd93fa5bbbd6d23d79b1c8942cf081c0deb00 100644
--- a/lib/src/iron-behaviors/iron-button-state.html
+++ b/lib/src/iron-behaviors/iron-button-state.html
@@ -125,33 +125,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
}
},
- _eventSourceIsPrimaryInput: function(event) {
- event = event.detail.sourceEvent || event;
-
- // Always true for non-mouse events....
- if (!this._mouseEventRe.test(event.type)) {
- return true;
- }
-
- // http://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/buttons
- if ('buttons' in event) {
- return event.buttons === 1;
- }
-
- // http://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/which
- if (typeof event.which === 'number') {
- return event.which < 2;
- }
-
- // http://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/button
- return event.button < 1;
- },
-
_downHandler: function(event) {
- if (!this._eventSourceIsPrimaryInput(event)) {
- return;
- }
-
this._setPointerDown(true);
this._setPressed(true);
this._setReceivedFocusFromKeyboard(false);
« no previous file with comments | « lib/src/iron-autogrow-textarea/test/basic.html ('k') | lib/src/iron-behaviors/test/active-state.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698