This can be viewed at https://tugboat-aqrmztryfqsezpvnghut1cszck2wwasr.tugboat.qa/tabs
If secondary tabs are present, the JS will throw an error
drupal.js?v=9.3.0-dev:16 Uncaught TypeError: Cannot read properties of null (reading 'clientHeight')
at isTabsMobileLayout (tabs.js?v=9.3.0-dev:15)
at init (tabs.js?v=9.3.0-dev:28)
at Array.forEach (<anonymous>)
at Object.attach (tabs.js?v=9.3.0-dev:40)
at drupal.js?v=9.3.0-dev:27
at Array.forEach (<anonymous>)
at Object.Drupal.attachBehaviors (drupal.js?v=9.3.0-dev:24)
at drupal.init.js?v=9.3.0-dev:29
at HTMLDocument.listener (drupal.init.js?v=9.3.0-dev:17)

| Comment | File | Size | Author |
|---|---|---|---|
| #9 | 3244621-tests-only.patch | 1.97 KB | catch |
| #8 | 3244621-post patch.png | 839.28 KB | rachel_norfolk |
| #7 | interdiff_2_7.txt | 1.97 KB | rikki_iki |
| #7 | 3244621-7.patch | 5.47 KB | rikki_iki |
| #4 | 3244621_olivero_js_tabs_patched.png | 44.26 KB | cathwaldron |
Comments
Comment #2
mherchelTugboat preview for this patch is at https://3244621-tabs-js-error-ohijdc1xm9ymzyxcaurbsbkezyrdeuna.tugboat.q...
Comment #3
cathwaldron commentedIssue 3244621
I checked to see if MHerchel's 3244621.patch eliminates the JS error.
I confirmed that yes, it does so.
Detail - Here is What I did:
In a browser window on my PC, I compared patched to unpatched Drupal Tugboat instances, to check that the JS error exists with unpatched, and does not exist with patched instance.
OS / Browser / Status:
Ubuntu 18.04 18.04.6 LTS 64-bit / Chrome Version 94.0.4606.61 (Official Build) (64-bit) / patch fixes error
Ubuntu 18.04 18.04.6 LTS 64-bit / Firefox Version 93.0 (64-bit) / patch fixes error
Windows 10 Home Version 20H2 (64-bit) / Edge Version 95.0.1020.30 (Official Build) (64-bit) / patch fixes error
Windows 10 Home Version 20H2 (64-bit) / Chrome Version 95.0.4638.54 (Official Build) (64-bit) / patch fixes error
Windows 10 Home Version 20H2 (64-bit) / Firefox Version 93.0 (64-bit) / patch fixes error
Attached screenshots (Edge browser on Windows 10 PC) show the comparison of unpatched and patched Olivero Tugboat instances.
Per MHerchel I will mark the status of this issue RTBC (reviewed and tested by the community)
Comment #4
cathwaldron commentedComment #5
cathwaldron commentedAttached screenshots (Edge browser on Windows 10 PC) show the comparison of unpatched and patched Olivero Tugboat instances, and that the patch fixes the JS error.
Per MHerchel I will mark the status of this issue RTBC (reviewed and tested by the community)
Comment #6
alexpottI think we should add some automated test coverage of Olivero's tabs. It looks like we're missing coverage.
Comment #7
rikki_iki commentedHere's an untested test.... Having trouble with chromedriver locally so putting it up for ci to test
Comment #8
rachel_norfolkLooks fixed in Safari 15.1, too.
The tests added in #7 look to give reasonable cover and are currently passing so I'm going to mark as RTBC!
Comment #9
catchUploading a test only patch to ensure the new test covers this bug.
Comment #10
gábor hojtsyWhile I am not a frontend pro, the fix itself looks very straightforward and in fact mostly a docs fix to follow the selector change to focus the behaviour on the primary tabs only. I agree that the fix looks good.
Comment #11
catchNice!
Patch in #7 remains the one to commit.
Comment #13
lauriiiCommitted f8a197f and pushed to 9.4.x. Also cherry-picked to 9.3.x. Thanks!