Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
When in Internet Explorer 11 the toolbar adds padding to the top of the body that pushes the body of the page too far past the toolbar itself. The expected behavior is that only enough padding is added to allow the toolbar to sit on top without covering the body. The correct behavior is observed in Chrome and FF.
Steps to reproduce:
- Open Drupal Site in IE11(May occur in more IE versions)
- Login to the site so that toolbar is present
- Scroll down on the page then change the page size
- Now scroll up and you should see a gap between the toolbar and the body of the page
Comment | File | Size | Author |
---|---|---|---|
#3 | IE11ToolbarOffset-2702891-3.patch | 766 bytes | ssneve90@gmail.com |
#2 | dom-padding-top.JPG | 58.79 KB | ssneve90@gmail.com |
#2 | Capture.JPG | 42.97 KB | ssneve90@gmail.com |
Comments
Comment #2
ssneve90@gmail.com CreditAttribution: ssneve90@gmail.com commentedI've added some images that show what happens in this bug.
Comment #3
ssneve90@gmail.com CreditAttribution: ssneve90@gmail.com at Newscycle Solutions commentedI looked into this issue and found that a parenthesis was not completely wrapping a ternary conditional operator for the expression that Internet Explorer uses to offset the toolbar. This happened in the file displace.js which seems to be used by multiple modules to calculate the offset.
Comment #6
kristofferwiklund CreditAttribution: kristofferwiklund at Websystem commentedI could reproduce the bug on IE11.
Patch solves the problem.
Comment #7
kristofferwiklund CreditAttribution: kristofferwiklund at Websystem commentedMight conflict with this issue. #2751643: Body padding too large, displace calculation inconsistent (IE10, IE11, and iPad2)
Comment #8
snte CreditAttribution: snte as a volunteer commentedThanks kristofferwiklund for the hint, and sjsneve for the patch! I combined this patch with the related in #2751643 (for 8.3.x-dev), if that is OK. I think both make sense.
Comment #9
alexpottCommitted and pushed a1af653 to 8.3.x and 8cd9c2c to 8.2.x. Thanks!
The ternary is definitely incorrectly implemented obviously chrome and FF somehow copy with this but IE doesn't - and we don't have specific browser testing so we can not add an automated test for this.