[MM-23215] prevent mouse event to go through and click on window (#1269)
This commit is contained in:
parent
26af87362f
commit
cc78da7d2c
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue