From e0d949b99e1120db01de1fbbfe79b2c956191fa2 Mon Sep 17 00:00:00 2001 From: Piro / SHIMODA Hiroshi Date: Wed, 30 Nov 2011 23:22:16 +0900 Subject: [PATCH] shrunken tab bar couldn't be resized by drag and drop because the tab bar was unexpectedly expanded near the resizer. --- modules/autoHide.js | 39 ++++++++++++++++++++------------------- 1 file changed, 20 insertions(+), 19 deletions(-) diff --git a/modules/autoHide.js b/modules/autoHide.js index afaf9b62..16c65a31 100644 --- a/modules/autoHide.js +++ b/modules/autoHide.js @@ -384,33 +384,34 @@ AutoHideBrowser.prototype = { var sensitiveArea = this.sensitiveArea; /* For resizing of shrunken tab bar and clicking closeboxes, - we have to shrink sensitive area a little. */ - if (this.shrunken) sensitiveArea -= 20; + if (this.shrunken) sensitiveArea = -24; if ( pos == 'left' ? - (aEvent.screenX <= box.screenX) : + (aEvent.screenX > box.screenX + sensitiveArea) : pos == 'right' ? - (aEvent.screenX >= box.screenX + box.width) : + (aEvent.screenX < box.screenX + box.width - sensitiveArea) : pos == 'bottom' ? - (aEvent.screenY >= box.screenY + box.height) : - (aEvent.screenY <= box.screenY) - ) + (aEvent.screenY < box.screenY + box.height - sensitiveArea) : + (aEvent.screenY > box.screenY + sensitiveArea) + ) { + return this.MOUSE_POSITION_OUTSIDE; + } + + if ( + pos == 'left' ? + (aEvent.screenX <= box.screenX - sensitiveArea) : + pos == 'right' ? + (aEvent.screenX >= box.screenX + box.width + sensitiveArea) : + pos == 'bottom' ? + (aEvent.screenY >= box.screenY + box.height + sensitiveArea) : + (aEvent.screenY <= box.screenY - sensitiveArea) + ) { return this.MOUSE_POSITION_INSIDE; + } - if ( - pos == 'left' ? - (aEvent.screenX <= box.screenX + sensitiveArea) : - pos == 'right' ? - (aEvent.screenX >= box.screenX + box.width - sensitiveArea) : - pos == 'bottom' ? - (aEvent.screenY >= box.screenY + box.height - sensitiveArea) : - (aEvent.screenY <= box.screenY + sensitiveArea) - ) - return this.MOUSE_POSITION_NEAR; - - return this.MOUSE_POSITION_OUTSIDE; + return this.MOUSE_POSITION_NEAR; }, MOUSE_POSITION_UNKNOWN : 0, MOUSE_POSITION_OUTSIDE : (1 << 0),