Breakpoint options not reset
See original GitHub issueBug is related to
- The Vanilla JavaScript version
- The React version
- The Embla Carousel core (all versions)
- Documentation website
- Other
Embla Carousel version
- v4.3.0
Describe the bug
- Some options what applied by CSS breakpoints is not reset when viewport resized to origin.
CodeSandbox
Steps to reproduce
- You can see codesandbox browser resolution is 320x675.
- Drag carousel.
dragFree
options isfalse
(initial) - To apply
dragFree
totrue
, resize codesandbox browser width up to 640px. I wrote breakpoint options in embla.css. - Drag carousel. now
dragFree
options istrue
. - Resize codesandbox browser width down to 375px.
- Drag carousel.
dragFree
options is stilltrue
.
Expected behavior
- options that applied by breakpoints should be reset(or disabled) when viewport resized to origin.
Additional context
I don’t understand whole code base yet, I guess options are overwriting when activate()
called.
just now, I can avoid this bug like this:
const Embla = styled('div', {
'&:before': {
display: 'none',
content: `'{"dragFree":false}'`,
},
variants: {
size: {
lg: {
when: {
desktop: {
'&:before': {
content: `'{"dragFree":true}'`,
},
},
},
},
},
},
}
I love your works. keep going to good things.
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (4 by maintainers)
Top Results From Across the Web
How to reset Visual Studio debugging options to default?
Go to Tools->Import and Export Settings and you can reset to default settings for whatever environment you're in.
Read more >Cannot reset hit count on a breakpoint from the breakpoints ...
I have breakpoints set to only break when the hit count reaches a certain number. I can reset the hit count at the...
Read more >Reset when adding or removing breakpoints - ST Community
When setting any breakpoint in a piece of code that's not active (e.g. some system init routine), it resets, and the reset flags...
Read more >Debugging features(break points and output window) aren't ...
Trying to debug an web application and I haven't been able to get breakpoints to works as I see a message saying "the...
Read more >Ghost experience parameters resetting! Anyone else? - Reddit
Not the general settings but Ghost experience parameters. ... r/BreakPoint - Being sussy on the battlefield.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi @iamchanii,
I’ve released v4.3.1 and it includes a fix for this bug. Install the latest version and the issue should be gone. Please let me know if it’s working as intended. Thank you for your help.
Best, David
@iamchanii thank you for testing 👍🏻.
You did everything right so I can confirm that this is a bug. I added the
embla-carousel-react.js
file which includes a fix for this bug.I’ll let you know when I’ve released the fix publicly which will be with v4.3.1.
Best, David