mirror of
https://github.com/vector-im/element-web.git
synced 2024-11-16 13:14:58 +08:00
On cancel, blur. Only onValueChanged when the value has changed...
This commit is contained in:
parent
7a092e4ac7
commit
1d5e47cd70
@ -123,6 +123,7 @@ module.exports = React.createClass({
|
||||
this.value = this.props.initialValue;
|
||||
this.showPlaceholder(!this.value);
|
||||
this.onValueChanged(false);
|
||||
this.refs.editable_div.blur();
|
||||
},
|
||||
|
||||
onValueChanged: function(shouldSubmit) {
|
||||
@ -192,7 +193,9 @@ module.exports = React.createClass({
|
||||
this.setState({
|
||||
phase: this.Phases.Display,
|
||||
}, function() {
|
||||
self.onValueChanged(submit);
|
||||
if (this.value !== this.props.initialValue) {
|
||||
self.onValueChanged(submit);
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user