Normalize selector operation in scrollspy#41726
Open
DenisLopatin wants to merge 3 commits intotwbs:mainfrom
Open
Normalize selector operation in scrollspy#41726DenisLopatin wants to merge 3 commits intotwbs:mainfrom
DenisLopatin wants to merge 3 commits intotwbs:mainfrom
Conversation
DenisLopatin
commented
Sep 6, 2025
XhmikosR
reviewed
Sep 7, 2025
Co-authored-by: XhmikosR <xhmikosr@gmail.com>
3 tasks
Contributor
|
Thanks for the fix @DenisLopatin. @XhmikosR et all: What can be done to help get this merged and released? What are the roadblocks, if any?
|
Contributor
|
@DenisLopatin - your solution works nicely! I couldn't wait for this to land, so I created a runtime patcher. Linking to it here in case it can be helpful to others in the meantime: https://www.docsy.dev/site/implementation/scrollspy-patch/ |
Author
It's good. The bootstrap team is probably busy with their own business right now). |
2 tasks
9 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes: #39198
Closes: #37858
Closes: #39248
Fix: #35566 (Hope, see below)
Description
Allows you to select the elements in the Scrollspy component that need to be escaped.
Motivation & Context
Users complain that they can't always control how their IDs for a component are filled in.
Type of changes
Checklist
npm run lint)Live previews
Related issues
#39198
#37858
#32586
#35566 (very important)
In PR #35566, @pierresouchay added a selector search mechanism when escaping
selector = selector.replaceAll(/#([^\s"#']+)/g, (match, id) => '#' + CSS.escape(id)). I removed the#symbol from there, as it interfered with the current implementation, but did not affect the previous functionality (during manual and automatic testing). I do not know why it was not necessary to escape the identifier inside the expression (#firistid#secondId is invalid), but the functionality works. In the worst case, it was necessary, but they just forgot to write the tests. At best, everything is fine.P.S. A lot of questions, so I will be glad to receive feedback))