diff --git a/phpBB/assets/javascript/core.js b/phpBB/assets/javascript/core.js index 785aa141f0..02fb3ed08d 100644 --- a/phpBB/assets/javascript/core.js +++ b/phpBB/assets/javascript/core.js @@ -1301,6 +1301,20 @@ phpbb.toggleDropdown = function() { if (direction == 'left') { options.dropdown.css('margin-left', '-' + freeSpace + 'px'); + + // Try to position the notification dropdown correctly in RTL-responsive mode + if (options.dropdown.hasClass('dropdown-extended')) { + var contentWidth, + fullFreeSpace = freeSpace + parent.outerWidth(); + + options.dropdown.find('.dropdown-contents').each(function() { + contentWidth = parseInt($(this).outerWidth()); + $(this).css({marginLeft: 0, left: 0}); + }); + + var maxOffset = Math.min(contentWidth, fullFreeSpace) + 'px'; + options.dropdown.css({'width': maxOffset, 'margin-left': '-' + maxOffset}); + } } else { options.dropdown.css('margin-right', '-' + (windowWidth + freeSpace) + 'px'); } diff --git a/phpBB/styles/prosilver/theme/common.css b/phpBB/styles/prosilver/theme/common.css index 1d8bd6f3df..c94bd7d017 100644 --- a/phpBB/styles/prosilver/theme/common.css +++ b/phpBB/styles/prosilver/theme/common.css @@ -1147,9 +1147,9 @@ form > p.post-notice strong { .dropdown-extended .dropdown-contents { max-height: none; - max-width: 340px !important; padding: 0; position: absolute; + width: 340px; } .dropdown-extended .header { diff --git a/phpBB/styles/prosilver/theme/responsive.css b/phpBB/styles/prosilver/theme/responsive.css index d921da62fb..82c23d8770 100644 --- a/phpBB/styles/prosilver/theme/responsive.css +++ b/phpBB/styles/prosilver/theme/responsive.css @@ -191,7 +191,7 @@ ul.topiclist li.row dt a.subforum { @media only screen and (max-width: 350px), only screen and (max-device-width: 350px) { .dropdown-extended .dropdown-contents { - max-width: 300px !important; + width: auto; } }