mirror of
https://github.com/finos/SymphonyElectron.git
synced 2026-07-29 15:55:55 -05:00
ELECTRON-769: removing context menu when right click on minimize, maximize and close button (#556)
This commit is contained in:
committed by
Vishwas Shashidhar
parent
642fec4b50
commit
4be202d698
@@ -78,6 +78,9 @@ class TitleBar {
|
||||
attachEventListeners(this.closeButton, 'click', this.closeWindow.bind(this));
|
||||
attachEventListeners(this.maximizeButton, 'click', this.maximizeOrUnmaximize.bind(this));
|
||||
attachEventListeners(this.minimizeButton, 'click', this.minimize.bind(this));
|
||||
attachEventListeners(this.minimizeButton, 'contextmenu', this.removeContextMenu.bind(this));
|
||||
attachEventListeners(this.maximizeButton, 'contextmenu', this.removeContextMenu.bind(this));
|
||||
attachEventListeners(this.closeButton, 'contextmenu', this.removeContextMenu.bind(this));
|
||||
|
||||
attachEventListeners(this.hamburgerMenuButton, 'mousedown', TitleBar.handleMouseDown.bind(this));
|
||||
attachEventListeners(this.closeButton, 'mousedown', TitleBar.handleMouseDown.bind(this));
|
||||
@@ -96,6 +99,18 @@ class TitleBar {
|
||||
this.closeButton.title = content.Close || 'Close';
|
||||
}
|
||||
|
||||
/**
|
||||
* Method that remove context menu
|
||||
* ELECTRON-769: Hamburger Menu - Copy/ Reload in menu context displays when right
|
||||
* clicking on minimize, maximize, close button of the hamburger menu
|
||||
*
|
||||
*/
|
||||
// eslint-disable-next-line class-methods-use-this
|
||||
removeContextMenu(event) {
|
||||
event.preventDefault();
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Method that adds borders
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user