From b74d4551ecaf1fbdb7ae96ce5c9d89d1f7686a9f Mon Sep 17 00:00:00 2001 From: nianxiongdi <920357774@qq,com> Date: Wed, 4 Dec 2019 21:15:59 +0800 Subject: [PATCH] fix(Input): stop bubble. close #1417 --- src/input/base.jsx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/input/base.jsx b/src/input/base.jsx index 7ba00bfe95..a32a3f86a6 100644 --- a/src/input/base.jsx +++ b/src/input/base.jsx @@ -138,6 +138,12 @@ class Base extends React.Component { } onChange(e) { + if ('stopPropagation' in e) { + e.stopPropagation(); + } else if ('cancelBubble' in e) { + e.cancelBubble(); + } + let value = e.target.value; if (this.props.trim) {