Skip to content

HTML dnd check for setup ddResizable before enable/disable#1506

Merged
adumesny merged 1 commit into
gridstack:developfrom
infime:fix-h5-resizable-tgl
Dec 2, 2020
Merged

HTML dnd check for setup ddResizable before enable/disable#1506
adumesny merged 1 commit into
gridstack:developfrom
infime:fix-h5-resizable-tgl

Conversation

@infime

@infime infime commented Dec 1, 2020

Copy link
Copy Markdown
Contributor

Description

Handle ddResizable enable/disable just like ddDraggable. Fixes #1505

Checklist

  • Created tests which fail without the change (if possible)
  • All tests passing (yarn test)
  • Extended the README / documentation, if necessary

this._getDDElements(el).forEach(dEl => {
if (opts === 'disable' || opts === 'enable') {
dEl.ddResizable[opts]();
dEl.ddResizable && dEl.ddResizable[opts]();

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hey I don't think this is right as is will not call enable if never created... which it needs to. Also move would need same fix.
if you look at the jquery version I force create for enable, and skip for disable/destroy
if (opts === 'enable') {
$el.resizable().resizable(opts);
} else if (opts === 'disable' || opts === 'destroy') {
if ($el.data('ui-resizable')) { // error to call destroy if not there
$el.resizable(opts);
}
}

@adumesny

adumesny commented Dec 2, 2020

Copy link
Copy Markdown
Member

thanks for the effort! let find a reproduceable case and I will fix it!

@adumesny adumesny closed this Dec 2, 2020
@adumesny adumesny reopened this Dec 2, 2020
@adumesny

adumesny commented Dec 2, 2020

Copy link
Copy Markdown
Member

taking this as partial fix. better one coming next.

@adumesny adumesny merged commit 1385b56 into gridstack:develop Dec 2, 2020
@infime infime deleted the fix-h5-resizable-tgl branch December 2, 2020 15:44
@infime

infime commented Dec 2, 2020

Copy link
Copy Markdown
Contributor Author

@adumesny thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3.0.0 HTML5 drag'n'drop initial GridStack.enable() Error

2 participants