Spawned from #3253156: [meta] Remove IE11 Support from Olivero.
Internet Explorer does not support the second argument within Element.classList.toggle(). See https://developer.mozilla.org/en-US/docs/Web/API/DOMTokenList/toggle
Now that Drupal 10 does not support IE, we can slightly refactor the JS to make use of this second "force" parameter.
| Comment | File | Size | Author |
|---|---|---|---|
| #10 | 3255131-10.patch | 10.38 KB | andy-blum |
| #7 | 3255131-2-7.txt | 3.06 KB | andy-blum |
| #7 | 3255131-7.patch | 14.23 KB | andy-blum |
| #2 | 3255131.patch | 7.31 KB | mherchel |
Issue fork drupal-3255131
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
- 3255131-js-update
compare
- 3255131-olivero-refactor-js
changes, plain diff MR !2468
Comments
Comment #2
mherchelComment #3
andypostI bet core needs separate issue to replace the usage as well, ++
Comment #4
andy-blumLogic appears to be maintained in the files that were edited, and I confirmed the classes & attributes toggle correctly in the browser. Did we want to include the second-level-navigation in this refactor as well? If not, good to move to RTBC.
Comment #5
mherchelyeah that's a good call. We could include that here.
Comment #6
andy-blumComment #7
andy-blumNew patch with second-level-nav logic updated.
Comment #8
mherchelThanks for working on this! Reviewed and manually tested the changes in #7.
Comment #9
mherchelNew patch has some unrelated CSS changes.
Comment #10
andy-blumRemoved unrelated CSS changes
Comment #11
mherchelManually tested and looked through patch in #10. Looks perfect. Thank you!
Comment #12
droplet commentedafter patch, these 2 lines are not using equal conditions.
Comment #13
xjmComment #14
xjmComment #17
finnsky commentedComment #18
longwaveI think there is a type error in one line in the refactoring, otherwise this looks correct to me.
Comment #19
wim leersComment #20
nod_Couple of comments to address in the MR
Comment #21
nod_Updated the MR so that it's using the correct js files following the mass-rename.
Comment #22
andy-blumComment #23
nod_Works for me, thanks :)
Comment #25
lauriiiCommitted a474384 and pushed to 10.1.x. Thanks!