-
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
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
grabCursor state doesn't get updated on breakpoint changes #7364
Closed
5 of 6 tasks
Hasan-Mir opened this issue
Mar 11, 2024
· 3 comments
· Fixed by Mapuppy09/tradetrust-website#8 · May be fixed by heliumtank92/am92-react-design-system#10, aswanthchandran0/eccomerce#4 or akashkumar8115/AspireNex_web-scraping-ecommerce-websites-#4
Closed
5 of 6 tasks
grabCursor state doesn't get updated on breakpoint changes #7364
Hasan-Mir opened this issue
Mar 11, 2024
· 3 comments
· Fixed by Mapuppy09/tradetrust-website#8 · May be fixed by heliumtank92/am92-react-design-system#10, aswanthchandran0/eccomerce#4 or akashkumar8115/AspireNex_web-scraping-ecommerce-websites-#4
Comments
t0ggles-create swiper |
Task nolimits4web/SWIPER-70 was created |
Task nolimits4web/SWIPER-70 status changed to Done |
This was referenced Jun 3, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Check that this is really a bug
Reproduction link
https://codesandbox.io/p/sandbox/swiper-grabcursor-bug-n6p2r5?file=%2Fsrc%2FApp.js%3A11%2C26
Bug description
If we want to have different behavior for
grabCursor
for some breakpoints like this:When the breakpoint changes, Swiper doesn't update the
grabCursor
state until the slider is swiped. However this only happens forfalse -> true
state transition nottrue -> false
. I mean if thegrabCursor
state istrue
and we resize the window to a breakpoint in which thegrabCursor
is set tofalse
, it won't get updated even after the user's swipe.20240311_112223.mp4
Expected Behavior
No response
Actual Behavior
The
grabCursor
state should get updated immediately when the breakpoint changes.Additionally, it would be beneficial if Swiper could merge breakpoint parameters (not just
grabCursor
) from one breakpoint to the next.For example in this code:
As you can see, from
350
breakpoint onwards, thegrabCursor
is set tofalse
and from560
breakpoint onwards, thegrabCursor
is set totrue
. To avoid redundancy, I prefer to omit the repeated property and write it as follows:Swiper version
11.0.7
Platform/Target and Browser Versions
Chrome 122.0.6261, Firefox 123.0.1
Validations
Would you like to open a PR for this bug?
The text was updated successfully, but these errors were encountered: