Skip to content

Commit cb17cb0

Browse files
authored
Merge pull request element-hq#4443 from vector-im/t3chguy/patch-3
fix Quote not closing contextual menu
2 parents 5d4b98d + 39ff11f commit cb17cb0

2 files changed

Lines changed: 8 additions & 7 deletions

File tree

‎.travis.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,4 @@ node_js:
1919
install:
2020
# clone the deps with depth 1: we know we will only ever need that one
2121
# commit.
22-
- scripts/fetch-develop.deps.sh --depth 1 && npm install
22+
- scripts/fetch-develop.deps.sh --depth 1 && npm i phantomjs-prebuilt && npm install

‎src/components/views/context_menus/MessageContextMenu.js‎

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -67,15 +67,15 @@ module.exports = React.createClass({
6767

6868
onResendClick: function() {
6969
Resend.resend(this.props.mxEvent);
70-
if (this.props.onFinished) this.props.onFinished();
70+
this.closeMenu();
7171
},
7272

7373
onViewSourceClick: function() {
7474
const ViewSource = sdk.getComponent('structures.ViewSource');
7575
Modal.createDialog(ViewSource, {
7676
content: this.props.mxEvent.event,
7777
}, 'mx_Dialog_viewsource');
78-
if (this.props.onFinished) this.props.onFinished();
78+
this.closeMenu();
7979
},
8080

8181
onViewClearSourceClick: function() {
@@ -84,7 +84,7 @@ module.exports = React.createClass({
8484
// FIXME: _clearEvent is private
8585
content: this.props.mxEvent._clearEvent,
8686
}, 'mx_Dialog_viewsource');
87-
if (this.props.onFinished) this.props.onFinished();
87+
this.closeMenu();
8888
},
8989

9090
onRedactClick: function() {
@@ -106,12 +106,12 @@ module.exports = React.createClass({
106106
}).done();
107107
},
108108
}, 'mx_Dialog_confirmredact');
109-
if (this.props.onFinished) this.props.onFinished();
109+
this.closeMenu();
110110
},
111111

112112
onCancelSendClick: function() {
113113
Resend.removeFromQueue(this.props.mxEvent);
114-
if (this.props.onFinished) this.props.onFinished();
114+
this.closeMenu();
115115
},
116116

117117
onForwardClick: function() {
@@ -130,7 +130,7 @@ module.exports = React.createClass({
130130
if (this.props.eventTileOps) {
131131
this.props.eventTileOps.unhideWidget();
132132
}
133-
if (this.props.onFinished) this.props.onFinished();
133+
this.closeMenu();
134134
},
135135

136136
onQuoteClick: function() {
@@ -139,6 +139,7 @@ module.exports = React.createClass({
139139
action: 'quote',
140140
event: this.props.mxEvent,
141141
});
142+
this.closeMenu();
142143
},
143144

144145
render: function() {

0 commit comments

Comments
 (0)