1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-03-13 20:28:44 +01:00

[ticket/12265] Fix issue with dropdown being restricted by the width of parent

PHPBB3-12265
This commit is contained in:
Cesar G 2014-04-10 05:18:57 -07:00
parent df8832455d
commit ec145419ed
2 changed files with 13 additions and 2 deletions

View File

@ -917,9 +917,10 @@ phpbb.toggleDropdown = function() {
// Check dimensions when showing dropdown
// !visible because variable shows state of dropdown before it was toggled
if (!visible) {
var windowWidth = $(window).width();
options.dropdown.find('.dropdown-contents').each(function() {
var $this = $(this),
windowWidth = $(window).width();
var $this = $(this);
$this.css({
marginLeft: 0,
@ -937,6 +938,13 @@ phpbb.toggleDropdown = function() {
$this.css('margin-left', (windowWidth - offset - width - 2) + 'px');
}
});
var freeSpace = parent.offset().left - 4;
if (direction == 'left') {
options.dropdown.css('margin-left', '-' + freeSpace + 'px');
} else {
options.dropdown.css('margin-right', '-' + (windowWidth + freeSpace) + 'px');
}
}
// Prevent event propagation

View File

@ -470,6 +470,7 @@ ul.linklist.bulletin li.no-bulletin:before {
border: 1px solid transparent;
border-radius: 5px;
padding: 9px 0 0;
margin-right: -500px;
}
.dropdown-container.topic-tools {
@ -485,6 +486,8 @@ ul.linklist.bulletin li.no-bulletin:before {
.dropdown-left .dropdown, .nojs .rightside .dropdown {
left: auto;
right: 0;
margin-left: -500px;
margin-right: 0;
}
.dropdown-button-control .dropdown {