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

Gridster disable reset on resize. #128

Open
kalzekdor opened this issue Dec 20, 2018 · 7 comments
Open

Gridster disable reset on resize. #128

kalzekdor opened this issue Dec 20, 2018 · 7 comments
Labels

Comments

@kalzekdor
Copy link

The state of the drag enable/disable setting seems to get reset whenever resize_responsive_layout() is called. If you disable() gridster, then have the resize layout called it becomes enabled again, causing widgets to be movable again.

@kalzekdor
Copy link
Author

Looks like the culprit is

this.toggle_collapsed_grid(full_width, opts);

in generate_stylesheet. The toggle_collapsed_grid method explicitly sets enabled/disabled flags, overwriting what was already set.

@fixmycode
Copy link

I'm going to look into it, because it clearly it's a bug, but I need to check if it resets the flags on the method for an specific reason or it was an oversight.

While I'm checking the issue, please, let me know how are you provisioning the library, are you downloading the source? are you using npm? I'm curious about how are we distributing... thanks!

@fixmycode fixmycode self-assigned this Dec 21, 2018
@fixmycode fixmycode added the bug label Dec 21, 2018
@kalzekdor
Copy link
Author

We're loading from https://www.jsdelivr.com/package/npm/dsmorse-gridster, which builds from NPM.

@DeadX07
Copy link

DeadX07 commented May 21, 2019

Is this issue going to be resolved? It is easily replicated on browser resize. We recently incorporated gridster into a custom Progress Kendo jQuery widget and encountered the same bug, which for us is a big deal.

@kalzekdor
Copy link
Author

Is this issue going to be resolved? It is easily replicated on browser resize. We recently incorporated gridster into a custom Progress Kendo jQuery widget and encountered the same bug, which for us is a big deal.

What I ended up doing was binding a callback to the window resize event that re-disables gridster if it's supposed to be disabled. Not sure if that'll work for your scenario, but it was an acceptable workaround for us.

@Donxiaohao
Copy link

@kalzekdor hello , I've been using it recently.Can you leave a contact to communicate? thank you

@cakidnyc
Copy link

I also hit this issue, the window resize callback solution works, but it hope it core problem can be fixed soon.

@fixmycode fixmycode removed their assignment Aug 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants