Mistake in the Documentation for tab shown event.
Created by: iaroslavglodov
At the end of the Navbar documentation, there is an example of weird behavior. When using the same code only the first tab event is treigerring. If using as tabEl
parent <ul>
element it works as expected.
var tabEl = document.querySelector('button[data-bs-toggle="tab"]')
tabEl.addEventListener('shown.bs.tab', function (event) {
event.target // newly activated tab
event.relatedTarget // previous active tab
})
—— macOS 11.2.3, Chrome Version 89.0.4389.90 (Official Build) (arm64)