mirror of
https://github.com/twbs/bootstrap.git
synced 2025-08-06 05:37:39 +02:00
Fix scrollspy and accented anchor links (#38502)
This commit is contained in:
committed by
GitHub
parent
2795421716
commit
a06c2e6b5f
@@ -208,11 +208,11 @@ class ScrollSpy extends BaseComponent {
|
||||
continue
|
||||
}
|
||||
|
||||
const observableSection = SelectorEngine.findOne(anchor.hash, this._element)
|
||||
const observableSection = SelectorEngine.findOne(decodeURI(anchor.hash), this._element)
|
||||
|
||||
// ensure that the observableSection exists & is visible
|
||||
if (isVisible(observableSection)) {
|
||||
this._targetLinks.set(anchor.hash, anchor)
|
||||
this._targetLinks.set(decodeURI(anchor.hash), anchor)
|
||||
this._observableSections.set(anchor.hash, observableSection)
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user