Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure data-bs-toggle is present in the BS3 tabset compatibility shims #492

Open
gadenbuie opened this issue Feb 28, 2023 · 0 comments · May be fixed by #501
Open

Ensure data-bs-toggle is present in the BS3 tabset compatibility shims #492

gadenbuie opened this issue Feb 28, 2023 · 0 comments · May be fixed by #501
Assignees

Comments

@gadenbuie
Copy link
Member

gadenbuie commented Feb 28, 2023

As we noticed in rstudio/flexdashboard#421, newer version of Bootstrap may require the data-bs-toggle in places where data-toggle was previously sufficient. In theory, we could handle this in the tabset compatibility shims by ensuring that data-toggle is copied to data-bs-toggle if the latter isn't present.

var SELECTOR = '[data-toggle="tab"], [data-toggle="pill"], [data-bs-toggle="tab"], [data-bs-toggle="pill"]';
$(document).on(EVENT_KEY, SELECTOR, function(event) {
event.preventDefault();
$(this).tab("show");
});

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant