From 45458b240b8c1b0453dcb5fcb75c54ccdb396eb9 Mon Sep 17 00:00:00 2001 From: Cesar G Date: Sat, 31 May 2014 17:00:18 -0700 Subject: [PATCH] [ticket/12013] Prevent the dropdown scrollbar from overlapping the content. PHPBB3-12013 --- phpBB/assets/javascript/core.js | 4 ++++ phpBB/styles/prosilver/theme/common.css | 8 ++++++++ 2 files changed, 12 insertions(+) diff --git a/phpBB/assets/javascript/core.js b/phpBB/assets/javascript/core.js index 02fb3ed08d..2c35875dca 100644 --- a/phpBB/assets/javascript/core.js +++ b/phpBB/assets/javascript/core.js @@ -1296,6 +1296,10 @@ phpbb.toggleDropdown = function() { else if ((offset + width + 2) > windowWidth) { $this.css('margin-left', (windowWidth - offset - width - 2) + 'px'); } + + // Check whether the vertical scrollbar is present. + $this.toggleClass('dropdown-nonscroll', this.scrollHeight === $this.innerHeight()); + }); var freeSpace = parent.offset().left - 4; diff --git a/phpBB/styles/prosilver/theme/common.css b/phpBB/styles/prosilver/theme/common.css index 19cd4e3139..ba567fd466 100644 --- a/phpBB/styles/prosilver/theme/common.css +++ b/phpBB/styles/prosilver/theme/common.css @@ -603,6 +603,14 @@ ul.linklist.bulletin > li.no-bulletin:before { text-align: left; } +.dropdown-contents > li { + padding-right: 15px; +} + +.dropdown-nonscroll > li { + padding-right: 0; +} + .dropdown li:first-child, .dropdown li.separator + li, .dropdown li li { border-top: 0; }