mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-01 19:39:13 +00:00
don't let context menu show up under mouse so that clicks can more easily dismiss it. bug 27364, thanks dean_tessman@hotmail.com.
This commit is contained in:
parent
9fca281d4b
commit
2499624f31
@ -20,6 +20,7 @@
|
||||
* Original Author: David W. Hyatt (hyatt@netscape.com)
|
||||
*
|
||||
* Contributor(s):
|
||||
* Dean Tessman <dean_tessman@hotmail.com>
|
||||
* Pierre Phaneuf <pp@ludusdesign.com>
|
||||
*/
|
||||
|
||||
@ -425,8 +426,15 @@ XULPopupListenerImpl::LaunchPopup(PRInt32 aClientX, PRInt32 aClientY)
|
||||
nsresult rv = NS_OK;
|
||||
|
||||
nsAutoString type; type.AssignWithConversion("popup");
|
||||
if ( popupType == eXULPopupType_context )
|
||||
if ( popupType == eXULPopupType_context ) {
|
||||
type.AssignWithConversion("context");
|
||||
|
||||
// position the menu two pixels down and to the right from the current
|
||||
// mouse position. This makes it easier to dismiss the menu by just
|
||||
// clicking.
|
||||
aClientX += 2;
|
||||
aClientY += 2;
|
||||
}
|
||||
else if ( popupType == eXULPopupType_tooltip )
|
||||
type.AssignWithConversion("tooltip");
|
||||
|
||||
|
@ -20,6 +20,7 @@
|
||||
* Original Author: David W. Hyatt (hyatt@netscape.com)
|
||||
*
|
||||
* Contributor(s):
|
||||
* Dean Tessman <dean_tessman@hotmail.com>
|
||||
* Pierre Phaneuf <pp@ludusdesign.com>
|
||||
*/
|
||||
|
||||
@ -425,8 +426,15 @@ XULPopupListenerImpl::LaunchPopup(PRInt32 aClientX, PRInt32 aClientY)
|
||||
nsresult rv = NS_OK;
|
||||
|
||||
nsAutoString type; type.AssignWithConversion("popup");
|
||||
if ( popupType == eXULPopupType_context )
|
||||
if ( popupType == eXULPopupType_context ) {
|
||||
type.AssignWithConversion("context");
|
||||
|
||||
// position the menu two pixels down and to the right from the current
|
||||
// mouse position. This makes it easier to dismiss the menu by just
|
||||
// clicking.
|
||||
aClientX += 2;
|
||||
aClientY += 2;
|
||||
}
|
||||
else if ( popupType == eXULPopupType_tooltip )
|
||||
type.AssignWithConversion("tooltip");
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user