mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-04 19:33:18 +00:00
Bug 850335 - Don't position Metro context menus past the edge of the screen [r=mbrubeck]
--HG-- extra : rebase_source : 630fa09104fd3f90d17736fe09faed73ae7bf676
This commit is contained in:
parent
0c7ce7925f
commit
58d00e486e
@ -454,8 +454,11 @@ MenuPopup.prototype = {
|
||||
}
|
||||
}
|
||||
|
||||
if (aX < 0)
|
||||
if (aX < 0) {
|
||||
aX = 0;
|
||||
} else if (aX + width + kPositionPadding > screenWidth){
|
||||
aX = screenWidth - width - kPositionPadding;
|
||||
}
|
||||
|
||||
if (aY < 0 && aPositionOptions.moveBelowToFit) {
|
||||
// show context menu below when it doesn't fit.
|
||||
|
Loading…
Reference in New Issue
Block a user