Added Offcanvas scroll after close option#40553
Conversation
|
noting that this isn't about scrolling. scrolling is a side effect of focus being (correctly) set back to the element that triggered the offcanvas. so, at the very least, rename this to be about focus, not scroll. |
|
As suggested, I have changed the name of the option.
|
|
Unfortunately, this still needs tests. |
…ion' into offcanvas_scroll_after_close_option
|
Superseded by #42544 for v6. The underlying problem here — closing the panel scrolls the page back to the toggler, breaking anchor links inside it — is resolved in v6's Drawer by restoring focus with The configurable opt-out this PR adds ( Closing. |
Description
I added a option
scrollAfterCloseto be able to disable the scrolling to the offcanvas toggler after the offcanvas is closed.Motivation & Context
Currently after the offcanvas is closed, the body always scrolling back to the offcanvas toggler position.
When enable offcanvas bodyscrolling and add anchor-links into the offcanvas, the links dont work.
Type of changes
Checklist
npm run lint)Live previews
Related issues
Closes #38070