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

Replaced initMouseEvent with MouseEvent constructor and added composed: true #2921

Merged

Conversation

Taal91
Copy link
Contributor

@Taal91 Taal91 commented Jan 8, 2025

Description

The deprecated method initMouseEvent has been replaced by the MouseEvent constructor. Additionally, compose: true has been added to allow gridstack.js to be used inside of a web component with touch events.

Checklist

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

@adumesny adumesny merged commit e6cddad into gridstack:master Jan 8, 2025
@adumesny
Copy link
Member

adumesny commented Jan 8, 2025

thanks for making this change

@h4de5
Copy link

h4de5 commented Jan 20, 2025

it seems this was not part of the latest release 11.3.
any chance you can estimate when this will be published?

@adumesny
Copy link
Member

It should be there. I merged it. Will have to check when I'm back on computer...

@h4de5
Copy link

h4de5 commented Jan 20, 2025

it seems files on npmjs.com differ from the one in the github release.

https://www.npmjs.com/package/gridstack?activeTab=code

@adumesny
Copy link
Member

adumesny commented Jan 22, 2025

I found the issue. there were 2 initMouseEvent() but only 1 was changed
https://github.com/gridstack/gridstack.js/blob/master/src/dd-touch.ts#L86
I thought my local git repo didn't have the changes....

@h4de5
Copy link

h4de5 commented Jan 22, 2025

hm. yes this is true.
But I mean in the version on npmjs.com none have been replaced. both places in dd-touch still use the .createEvent method.

adumesny added a commit to adumesny/gridstack.js that referenced this pull request Jan 26, 2025
fix gridstack#2921 to remove the remaining 2 initMouseEvent() calls.
@adumesny adumesny mentioned this pull request Jan 26, 2025
3 tasks
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 participants