Skip to content

Commit

Permalink
Merge pull request #1557 from adumesny/develop
Browse files Browse the repository at this point in the history
fixed no-drop cursor on windows
  • Loading branch information
adumesny authored Jan 3, 2021
2 parents 2963bf6 + aaa167c commit ddc34d6
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
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

0 comments on commit ddc34d6

Please sign in to comment.