Skip to content

H5 safari drag fix#1549

Merged
adumesny merged 1 commit into
gridstack:developfrom
adumesny:develop
Jan 2, 2021
Merged

H5 safari drag fix#1549
adumesny merged 1 commit into
gridstack:developfrom
adumesny:develop

Conversation

@adumesny

@adumesny adumesny commented Jan 2, 2021

Copy link
Copy Markdown
Member

Description

  • fix H5 Gridstack.js completely useless in safari #1540
  • DragEvent is not defined on Safari (regular MouseEvent + dataTransfer field)
    so fixed initEvent() to not use instanceof DragEvent but copy fields
  • according to spec (and required by Safari) the drag image has to be visible in
    the browser (in dom and not hidden) so make it a 1px div
    (this also helps chrome not showing a no-drop target cursor on Mac)
  • more DD code cleanup

Checklist

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

* fix gridstack#1540
* DragEvent is not defined on Safari (regular MouseEvent + dataTransfer field)
so fixed initEvent() to not use `instanceof DragEvent` but copy fields
* according to spec (and required by Safari) the drag image has to be visible in
the browser (in dom and not hidden) so make it a 1px div
(this also helps chrome not showing a no-drop target cursor on Mac)
* more DD code cleanup
@adumesny adumesny merged commit 61235de into gridstack:develop Jan 2, 2021
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.

H5 Gridstack.js completely useless in safari

1 participant