From d7ad2b80e39dc152d6c82b794c6385c1d305a6dc Mon Sep 17 00:00:00 2001 From: ustccjw <317713370@qq.com> Date: Thu, 2 Jul 2015 10:27:54 +0800 Subject: [PATCH 1/3] set enhanced-button type=button default --- src/enhanced-button.jsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/enhanced-button.jsx b/src/enhanced-button.jsx index ab98f63cdf17ef..9654a97e26e0a8 100644 --- a/src/enhanced-button.jsx +++ b/src/enhanced-button.jsx @@ -49,7 +49,8 @@ let EnhancedButton = React.createClass({ onKeyDown: () => {}, onKeyUp: () => {}, onTouchTap: () => {}, - tabIndex: 0 + tabIndex: 0, + type: 'button' }; }, @@ -129,7 +130,8 @@ let EnhancedButton = React.createClass({ onTouchTap: this._handleTouchTap, onKeyUp: this._handleKeyUp, onKeyDown: this._handleKeyDown, - tabIndex: tabIndex + tabIndex: tabIndex, + type: 'button' }; let buttonChildren = []; From 2e559eb3e2e7f55a59e72777a3d18aa052ec6f95 Mon Sep 17 00:00:00 2001 From: ustccjw <317713370@qq.com> Date: Thu, 2 Jul 2015 12:09:11 +0800 Subject: [PATCH 2/3] fix --- src/enhanced-button.jsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/enhanced-button.jsx b/src/enhanced-button.jsx index 9654a97e26e0a8..ce4f31f77b15fc 100644 --- a/src/enhanced-button.jsx +++ b/src/enhanced-button.jsx @@ -130,8 +130,7 @@ let EnhancedButton = React.createClass({ onTouchTap: this._handleTouchTap, onKeyUp: this._handleKeyUp, onKeyDown: this._handleKeyDown, - tabIndex: tabIndex, - type: 'button' + tabIndex: tabIndex }; let buttonChildren = []; From 00b6ba1d655a1cb8d9f120bf43a07ff677f82334 Mon Sep 17 00:00:00 2001 From: ustccjw <317713370@qq.com> Date: Thu, 2 Jul 2015 15:25:45 +0800 Subject: [PATCH 3/3] explicit pass type for enhanced-button --- src/enhanced-button.jsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/enhanced-button.jsx b/src/enhanced-button.jsx index ce4f31f77b15fc..9092bbd32053f6 100644 --- a/src/enhanced-button.jsx +++ b/src/enhanced-button.jsx @@ -104,6 +104,7 @@ let EnhancedButton = React.createClass({ onTouchTap, style, tabIndex, + type, ...other } = this.props; @@ -130,7 +131,8 @@ let EnhancedButton = React.createClass({ onTouchTap: this._handleTouchTap, onKeyUp: this._handleKeyUp, onKeyDown: this._handleKeyDown, - tabIndex: tabIndex + tabIndex: tabIndex, + type: type }; let buttonChildren = [];