- First commit to issue fork.
- Merge request !3355Issue #3209129: Scrolling problems when adding a block via layout builder β (Open) created by jds1
- @jds1 opened merge request.
- Merge request !33573209129 β remove auto-scrolling behavior when adding blocks in Layout Builder β (Closed) created by jds1
- πΊπΈUnited States jds1 Hudson Valley, NY
Hi everyone! Apologies for the multiple MRs β I am still trying to figure out this new process vs. old skool patching =).
We have a client where the auto-scrolling behavior is causing massive usability problems in Layout Builder when combined with Layout Builder iFrame Modal. MR 3357 removes this in 9.5.x (tested) and MR 3355 removes this in 10.1.x (untested, probably should just let this one be but I will circle back once I get 10.x running). I know there are plans to replace this with something else at some point and I doubt this type of removal will be accepted, but honestly I believe the experience is much better without the auto scrolling.
- π¨π¦Canada mgifford Ottawa, Ontario
- π³πΏNew Zealand danielveza Brisbane, AU
- π«π·France nod_ Lille
closing 9.5.x MR since that version is outdated
- πΊπΈUnited States luke.leber Pennsylvania
re: #22 - It looks like the patch from #5 was made against Drupal 9 (which shipped with *.es6.js files transpiled to es5). #20 seems to be for Drupal ^10.
MR !3355 just straight-up removes the javascript, which isn't a valid approach IMO.
I feel this should be addressed and have test coverage added in a follow-up. Javascript based testing like this is very hard relative to the simplicity of the fix.
- πΊπΈUnited States luke.leber Pennsylvania
Luke.Leber β changed the visibility of the branch 10.1.x to hidden.
- π§π·Brazil andre.bonon
andre.bonon β made their first commit to this issueβs fork.
- π«π·France Grimreaper France π«π·
Hi,
Agreed with comment 16.
I have not dug why there is an eventListener on a CSS event but a side effect of JS listening to transitionend event is as soon as any CSS transition happens, like on Olivero put mouse hover shortcut icon or the main menu folding/unfolding when going on top of the page, it scrolls again.
I have tried to put the scroll logic into:
window.addEventListener('dialog:afterclose', (e) => { const $element = $(e.target); if (Drupal.offCanvas.isOffCanvas($element)) {
But at this moment
const $target = $('.is-layout-builder-highlighted');
finds no results while there is still the highlighted block.I will create a branch which removes the scroll.
- Merge request !12346Draft: Issue #3209129 by grimreaper: Remove scroll when adding/updating a block via layout builder β (Open) created by Grimreaper
- Merge request !12347Draft: Issue #3209129 by grimreaper: Remove scroll when adding/updating a block via layout builder β (Open) created by Grimreaper
- π«π·France Grimreaper France π«π·
Patch for Composer usage for 10.5.x.