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.
Problem
On clicking a checkbox toggle the viewport jumps to the top of the page. Additionally I found toggles that are not clickable (contrib module)
Steps to reproduce
- Go to a page with a checkbox toggle, e.g. any block or
admin/config/media/media-settings
- Scroll down a bit
- Click toggle
- See that viewport scrolls to top
Note that this does not happen for toggles inside tabs, e.g. on block config pages. I also checked this on an install with many custom modules and a vanilla drupal 8.8.5 with mo other modules installed.
Setups tested via browserstack
- Ubuntu 16.04 + FF75 - JUMPS (local)
- Windows 10 + FF75 - JUMPS
- Windows 10 + Edge 81 - OK
- Windows 10 + Opera 67 - OK
- macOS Catalina FF 75 - OK
Problem 2: Unclickable toggle issue
Additionally if you install switch_page_theme, the toggles on its config page are not clickable (/admin/config/system/switch_page_theme
. There is also no change of the cursor on hovering.
Setups tested:
- macOS Catalina FF 75 - can reproduce
- Windows 10 + FF75 - can reproduce
- Windows 10 + Edge 81 - can reproduce
- Ubuntu 16.04 + Chromium 81 - can reproduce
Both does not happen with claro theme.
Comment | File | Size | Author |
---|---|---|---|
#14 | 3130046-14.patch | 203.45 KB | saschaeggi |
| |||
#12 | 3130046-12.patch | 203.02 KB | saschaeggi |
|
Comments
Comment #2
saschaeggiCan you check the console? Do you get any errors? Thanks
Comment #3
anruetherNope, nothing there in both cases.
Comment #4
saschaeggiComment #5
saschaeggiChecked this on dev with Chrome, FF & Safari and can't reproduce yet.
Comment #6
anruetherThat is strange! Can I send you credentials for a dev site? (I just installed the site again, with nothing but d8.8.5 and gin 3.x-dev):
(Only tested the first glitch)
Comment #7
nisha11 CreditAttribution: nisha11 at Srijan | A Material+ Company for Drupal India Association commentedi have added patch to resolve checkbox toggle button when click , it used to scroll to top and also found module was not working on module switch. As mention by @anruether it was happening in firefox , tested with switch_page_theme module.
Comment #8
anruetherThanks nisha11.
I cannot apply the patch. I see two quite obvious issues:
Comment #9
anruetherComment #10
anruetherSee issue summary for some more test details. It seems these are different bugs, the first one is limited to ff (75).
Comment #11
nisha11 CreditAttribution: nisha11 at Srijan | A Material+ Company for Drupal India Association commentedanruether, i have added FF specific css for first one and for problem two i have added js for toggle event which is not getting applied on table checkbox because all the other switches its working correctly. switch_page_theme is inside drag-able table.Please review.
i have removed all complied css and js which was there on my previous patch so after applying the patch you need to compile css and js.
Comment #12
saschaeggiI've quickly rerolled the patch from #11.
Please test :)
Comment #13
anruetherThanks! This solves both issues!
Only 1 nitpick: For the second issue on hovering over the switch_page_theme checkbox toggle, the cursor does not change to pointer. The markup is different there, we have a table and are inside
.tabledrag-cell-content__item
element.Comment #14
saschaeggiAs I'm still not able to activate this module somehow I did a change "blindly". can you check if this patch solves the cursor?
Comment #15
anruetherYes, this works for me. The cursor changes to pointer. Great, thanks a lot!
Comment #17
saschaeggiGreat thanks all. Will do another Alpha release :)
Comment #18
saschaeggi