@@ -279,14 +279,19 @@ export class Draggable {
279279 const isDraggable = Draggable . isDraggable ( wc , input , options ) ;
280280 if ( isDraggable === false ) { return ; }
281281 this . setInitialPosition ( dragState ) ; // Not using input.x/y because of inconsistent values
282+
283+ if ( isDraggable === true ) { dragState . interval = null ; return ; }
282284 ( async ( ) => await isDraggable && ( dragState . interval = null ) ) ( ) ;
283285 return ;
284286 }
285287
286288 // Handle double-click to maximize/unmaximize
287289 if ( input . clickCount === 2 && options . maximize ) {
290+ const isDraggable = Draggable . isDraggable ( wc , input , options ) ;
291+ if ( isDraggable === false ) { return ; }
288292 e . preventDefault ( ) ;
289- this . toggleMaximize ( ) ;
293+ if ( isDraggable === true ) { this . toggleMaximize ( ) ; return ; }
294+ ( async ( ) => await isDraggable && this . toggleMaximize ( ) ) ( ) ;
290295 }
291296 }
292297 } ;
@@ -311,7 +316,7 @@ export class Draggable {
311316 }
312317
313318 // eslint-disable-next-line @stylistic/max-len
314- private static isDraggable ( webContents : WebContents , point : Point , options : InternalDragOptions ) : false | Promise < boolean > {
319+ private static isDraggable ( webContents : WebContents , point : Point , options : InternalDragOptions ) : boolean | Promise < boolean > {
315320 if ( options . region && ! Draggable . isDraggingRegion ( options . region , point ) ) { return false ; }
316321
317322 if ( options . selector ) {
@@ -322,7 +327,7 @@ export class Draggable {
322327 return Draggable . closest ( webContents , point , options . exclude , true ) ;
323328 }
324329
325- return Draggable . TRUE_PROMISE ;
330+ return true ;
326331 }
327332
328333 private static isDraggingRegion ( region : Partial < Rectangle > , point : Point ) : boolean {
0 commit comments