Skip to content

H5 Gridstack.js completely useless in safari #1540

Closed

Description

@kevinlandsberg

Subject of the issue

Gridstack.js completely useless in safari.

Your environment

  • Gridstack.js version: 3.1.2 with HTML5
  • Safari, Version 14.0.2 (16610.3.7.1.9) under MacOS Big Sur

Steps to reproduce

Just visit libary homepage and try to use examples.

Expected behavior

Tiles should be draggable

Actual behavior

No dragging ability...

Activity

  1. adumesny commented on Dec 20, 2020

    @adumesny
    Member

    will take me a while to try this on a mac as I'm on windows...

  2. changed the title [-]Gridstack.js completely useless in safari[/-] [+]H5 Gridstack.js completely useless in safari[/+] on Dec 20, 2020
  3. kevinlandsberg commented on Dec 20, 2020

    @kevinlandsberg
    Author

    Yeah,

    but it seems to get more importance to support Safari cause Apple is selling a lot of computers atm 👍🏿

  4. kevinlandsberg commented on Dec 20, 2020

    @kevinlandsberg
    Author

    You can try out Browserstack (https://www.browserstack.com/)

  5. shmolf commented on Dec 21, 2020

    @shmolf

    JavaScript Console Error

    TypeError: $('.newWidget').draggable is not a function. (In '$('.newWidget').draggable({
          revert: 'invalid',
          scroll: false,
          appendTo: 'body',
          helper: 'clone'
        })', '$('.newWidget').draggable' is undefined)
        ```
    
  6. adumesny commented on Dec 21, 2020

    @adumesny
    Member

    @shmolf sounds like you are mixing html5 and jquery-ui there... I don't think that pertains to the site demos but I have not looked on safari yet.

  7. shmolf commented on Dec 21, 2020

    @shmolf

    @shmolf sounds like you are mixing html5 and jquery-ui there... I don't think that pertains to the site demos but I have not looked on safari yet.

    Ack! You're probably right. I'll try changing my assets, and let you know the result.

  8. shmolf commented on Dec 21, 2020

    @shmolf

    I was using the following CDN URL
    https://cdn.jsdelivr.net/npm/gridstack@3.1.2/dist/gridstack-h5.js

    This was referenced by the JS Fiddle example.

    Nothing else is loaded, other than CSS.

  9. shmolf commented on Dec 21, 2020

    @shmolf

    We may independently use Jquery UI, but not for Gridstack.

    Does Gridstack check if Jquery UI is globally available, then references if so?

  10. adumesny commented on Dec 21, 2020

    @adumesny
    Member

    please file a separate bug with reproduceable example. And no we don't reference JQ ui if it's available...onlyif our JQ plugin is used.

  11. shshen commented on Dec 27, 2020

    @shshen

    I have same issue in safari, when i drag a grid element. I'm using latest release build:

    [Error] ReferenceError: Can't find variable: DragEvent
    initEvent (gridstack-h5.js:2:58075)
    _dragStart (gridstack-h5.js:2:41983)
    _dragStart

  12. adumesny commented on Dec 28, 2020

    @adumesny
    Member

    for now you will need to use the jquery version

  13. added a commit that references this issue on Dec 29, 2020
  14. pinned this issue on Dec 31, 2020
  15. adumesny commented on Jan 1, 2021

    @adumesny
    Member

    I spent a lot of time over the break and think I have a fix for Safari (and also better behavior for Chrome). Help or Donations would be appreciated..

  16. kevinlandsberg commented on Jan 2, 2021

    @kevinlandsberg
    Author

    I spent a lot of time over the break and think I have a fix for Safari (and also better behavior for Chrome). Help or Donations would be appreciated..

    I will definetly donate as soon as it will work on Safari and there will be the engine fix for swapping grid items instead of pushing them down...#149

  17. added 3 commits that reference this issue on Jan 2, 2021
    0205f9b
    078caa6
    07cbbd6
  18. adumesny commented on Jan 2, 2021

    @adumesny
    Member

    fixed in upcoming 3.1.3

  19. unpinned this issue on Jan 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions