Skip to content

Apply driver button style through CSS class #556

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

jarikmarwede
Copy link
Contributor

Fixes #555

Comment on lines 207 to 215
return (
!popover?.description.contains(target) &&
!popover?.title.contains(target) &&
typeof target.className === "string" &&
target.className.includes("driver-popover")
typeof target.className === "string" && (
target.classList.contains("driver-popover-prev-btn") ||
target.classList.contains("driver-popover-next-btn") ||
target.classList.contains("driver-popover-close-btn")
)
);
Copy link
Contributor Author

@jarikmarwede jarikmarwede Feb 20, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure if this code makes the most sense now. Maybe it can be simplified, but I haven't fully understood what it is supposed to do in the first place.
The reason I had to change it is that the previous check wasn't specific enough and would capture click events of every button with the new driver-popover-footer-btn class, including the ones added by users that wanted to add a custom button but still keep the default button style.

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 this pull request may close these issues.

Custom button classes get overwritten by library CSS
1 participant