question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Breakpoint options not reset

See original GitHub issue

Bug 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

  1. You can see codesandbox browser resolution is 320x675.
  2. Drag carousel. dragFree options is false (initial)
  3. To apply dragFree to true, resize codesandbox browser width up to 640px. I wrote breakpoint options in embla.css.
  4. Drag carousel. now dragFree options is true.
  5. Resize codesandbox browser width down to 375px.
  6. Drag carousel. dragFree options is still true.

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:closed
  • Created 2 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
davidjerlekecommented, Apr 1, 2021

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

1reaction
davidjerlekecommented, Apr 1, 2021

@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

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found