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

fixed no-drop cursor on windows #1557

Merged
merged 1 commit into from
Jan 3, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions doc/CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,12 @@ Change log
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
## 3.1.3-dev

- TBD
- fix [1557](https://github.com/gridstack/gridstack.js/pull/1557) fixed no-drop cursor on windows when dragging within a default grid (no external drag in)

## 3.1.3 (2021-1-2)

- fix [1535](https://github.com/gridstack/gridstack.js/issues/1535) use batchUpdate() around grid init to make sure gs-y attributes are respected.
- fix [1540](https://github.com/gridstack/gridstack.js/issues/1540) Safari H5 drag&drop fixed
- fix [1535](https://github.com/gridstack/gridstack.js/issues/1535) use batchUpdate() around grid init to make sure gs-y attributes are respected.
- fix [1545](https://github.com/gridstack/gridstack.js/issues/1545) `disableMove()` correctly prevents drag later (remove events and draggable attribute)
- fix [1546](https://github.com/gridstack/gridstack.js/issues/1546) resize no longer delayed, which caused race conditions errors
- fix [1001](https://github.com/gridstack/gridstack.js/issues/1001) resizing near bottom/top needs to auto-scroll/. thanks [@hbcarlos](https://github.com/hbcarlos)!
Expand Down
11 changes: 10 additions & 1 deletion src/gridstack-dd.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,16 @@ export abstract class GridStackDD extends GridStackDDI {

/** @internal called to add drag over support to support widgets */
GridStack.prototype._setupAcceptWidget = function(): GridStack {
if (this.opts.staticGrid || !this.opts.acceptWidgets) return this;
if (this.opts.staticGrid) return this;

// if we don't accept external widgets (default) we still need to accept dragging within our
// list of items (else we get a no-drop icon on windows)
if (!this.opts.acceptWidgets) {
GridStackDD.get().droppable(this.el, {
accept: (el: GridItemHTMLElement) => el.gridstackNode && el.gridstackNode.grid === this
})
return this;
}

let onDrag = (event, el: GridItemHTMLElement) => {
let node = el.gridstackNode;
Expand Down