-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
v6 mouse events and React #2018
Comments
before you even click&drag ? you need to post an example showing the issue please. |
@adumesny reproducer: https://github.com/bhowell2-fleetio/gridstack-v6-mouseevent-repro It seems to mostly be a react thing. I'm not sure what changes were made in v6, but v6 doesn't work "as well" with react as v5. There is also a double |
V6 doesn't work in my react project |
thanks for the sample! I found the problem. apparently we do use protected _setupAutoHide(auto: boolean): DDResizable {
if (auto) {
this.el.classList.add('ui-resizable-autohide');
// use mouseover/mouseout instead of mouseenter/mouseleave to get better performance;
this.el.addEventListener('mouseover', this._mouseOver);
this.el.addEventListener('mouseout', this._mouseOut);
.....
protected _mouseOver(e: Event) {
this.el.classList.remove('ui-resizable-autohide');
e.stopPropagation();
} and apparently in v6 I added the I'll have to test why I made that change, but that's incorrect. |
Update: according to the doc this was broken in previous build. Not sure why react onMouseEnter() on a child doesn't get a first crack at it, unless it's waiting for it to bubble to the top to handle it, which seems broken to me. If your child has a enter handler if you get it first, then bubble to me, but I don't want to bubble to a parent grid-item I will have to special case not handling that enter if a child that wants is present, but that seems a lot of work and not necessary. |
* fix for gridstack#2018 * resizable _mouseOver() no longer calls event.stopPropagation() (which seems like the right thing to do) but relies instead on DDManager to track our active item
fixed in v6.0.1 - don't forget to donate if you find this lib useful! @patrickabkarian saying it doesn't work doesn't help me one bit... file a separate bug with reproduceable case like Blake did. I don't use React (Angular) |
Subject of the issue
The newest release, v6, is eating mouse events. This was not occurring in v5. (edited)
E.g., I have a hover-popper registered on a widget's child element and it does not receive the mouseOver event
The text was updated successfully, but these errors were encountered: