mirror of
https://github.com/xevidos/codiad.git
synced 2024-11-13 07:11:14 +01:00
Merge branch 'development' into 'master'
Fixed listener not removing after context menu closes See merge request xevidos/codiad!26
This commit is contained in:
commit
8fa741a9d6
2 changed files with 12 additions and 15 deletions
|
@ -205,15 +205,12 @@
|
|||
.removeClass('disabled');
|
||||
}
|
||||
// Hide menu
|
||||
$('#file-manager, #editor-region')
|
||||
.on('mouseover', function() {
|
||||
|
||||
/**
|
||||
* make sure that the user has moved their mouse far enough
|
||||
* away from the context menu to warrant a close.
|
||||
*/
|
||||
$('#file-manager, #editor-region').on( 'mousemove', codiad.filemanager.contextCheckMouse );
|
||||
});
|
||||
/**
|
||||
* make sure that the user has moved their mouse far enough
|
||||
* away from the context menu to warrant a close.
|
||||
*/
|
||||
$('#file-manager, #editor-region').on( 'mousemove', codiad.filemanager.contextCheckMouse );
|
||||
|
||||
/* Notify listeners. */
|
||||
amplify.publish('context-menu.onShow', {e: e, path: path, type: type});
|
||||
// Hide on click
|
||||
|
@ -226,11 +223,11 @@
|
|||
contextCheckMouse: function( e ) {
|
||||
|
||||
let offset = $('#context-menu').offset();
|
||||
let bottom = offset.top + $('#context-menu').outerHeight( true ) + 10;
|
||||
let left = offset.left - 10;
|
||||
let right = offset.left + $('#context-menu').outerWidth( true ) + 10;
|
||||
let top = offset.top - 10;
|
||||
console.log( e );
|
||||
let bottom = offset.top + $('#context-menu').outerHeight( true ) + 20;
|
||||
let left = offset.left - 20;
|
||||
let right = offset.left + $('#context-menu').outerWidth( true ) + 20;
|
||||
let top = offset.top - 20;
|
||||
|
||||
if( ( e.clientX > right || e.clientX < left ) || ( e.clientY > bottom || e.clientY < top ) ) {
|
||||
|
||||
$('#file-manager, #editor-region').off( 'mousemove', codiad.filemanager.contextCheckMouse );
|
||||
|
|
|
@ -12,7 +12,7 @@ class Update {
|
|||
// CONSTANTS
|
||||
//////////////////////////////////////////////////////////////////
|
||||
|
||||
CONST VERSION = "v.2.9.3.4";
|
||||
CONST VERSION = "v.2.9.3.5";
|
||||
|
||||
//////////////////////////////////////////////////////////////////
|
||||
// PROPERTIES
|
||||
|
|
Loading…
Reference in a new issue