[MM-23215] prevent mouse event to go through and click on window (#1269)

This commit is contained in:
Guillermo Vayá 2020-04-22 19:08:54 +02:00 committed by GitHub
parent 26af87362f
commit cc78da7d2c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -520,17 +520,20 @@ export default class MainPage extends React.Component {
}
}
handleClose = () => {
handleClose = (e) => {
e.stopPropagation(); // since it is our button, the event goes into MainPage's onclick event, getting focus back.
const win = remote.getCurrentWindow();
win.close();
}
handleMinimize = () => {
handleMinimize = (e) => {
e.stopPropagation();
const win = remote.getCurrentWindow();
win.minimize();
}
handleMaximize = () => {
handleMaximize = (e) => {
e.stopPropagation();
const win = remote.getCurrentWindow();
win.maximize();
}