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

Failed to execute 'add' on 'DOMTokenList' for Scrollbar dragClass option #7096

Closed
6 tasks done
themagickoala opened this issue Oct 9, 2023 · 1 comment
Closed
6 tasks done
Labels

Comments

@themagickoala
Copy link

themagickoala commented Oct 9, 2023

Check that this is really a bug

  • I confirm

Reproduction link

https://codesandbox.io/s/swiper-dragclass-issue-nhyjzt

Bug description

When using Tailwind with class fields on e.g. Scrollbar's dragClass option, Swiper is assuming a single classname. This should be split on spaces and passed to classList.add as an array.

Expected Behavior

We should be able to pass multiple classes to this, as per #6344 and other related issues.

Actual Behavior

See codesandbox:

Failed to execute 'add' on 'DOMTokenList': The token provided ('left-0 top-0 relative w-full h-full rounded-xl bg-font-tertiary') contains HTML space characters, which are not valid in tokens.

Swiper version

10.3.1

Platform/Target and Browser Versions

Chrome 117.0.5938.149

Validations

  • Follow our Code of Conduct
  • Read the docs.
  • Check that there isn't already an issue that request the same feature to avoid creating a duplicate.
  • Make sure this is a Swiper issue and not a framework-specific issue

Would you like to open a PR for this bug?

  • I'm willing to open a PR
@David-Tsui
Copy link

David-Tsui commented Apr 21, 2024

@themagickoala It seems a line of code was missed when 11.0.0 was launched. So it might not work during these months, right?

image

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

Successfully merging a pull request may close this issue.

2 participants