-
Notifications
You must be signed in to change notification settings - Fork 381
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
Item follows mouse pointer and gridster crashes #401
Comments
Could you create a stackblitz with a minimal reproduction of the issue for me to play around with? Right now I have no clue what could cause this issue for you. |
I am getting the same issue. it is random but happening often making it difficult to use. Mouse will stick to the widget while dragging and you cannot do anything to get out, The only option is refresh the page...I will see If I can reproduce this easily. Please let me know if this issue solved, I am 3 months into a project using angular gridster and we do not have an alternative option. |
I did not get it to reproduce the error in stackblitz. It just won't show up but in the project the error is still existing. |
Could this be related to #405? And if so could it be fixed in v5.3.4? If either of you are able to make a stackblitz that recreates the problem I could take a closer look at it. |
Yes, it looks related after checking the JsFiddle provided in 405. Can you provide this fix in latest 6.05 package with angular 6 |
I have tested the version 5.3.4 from issue #405 but it is still the same error and the same situation. Didn't solve it. |
yeah same here. the issue does not seem to be fixed. To reproduce This happens more when there are many widgets and you are trying to move a widget over other widgets and then mouse gets stuck with the widget and only way out is to refresh page. You cannot even put it back in the same place as before. |
It seems that my commit to fix a typo in dchipan's pull request somehow didn't make it into the release for v5.3.4. I'll see if I can't remedy that. The bug should be fixed properly on v6.06. v5.3.5 is now released on npm. It has the fix for the Iframe drag, and it also fixes the issue for resizing an item out of an iframe (is not an issue in v6.x for what ever reason). |
The issues still exist for me. I was going through previous issues and I see another user having the same issues with ifrrame. My use case is similar, but instead of iframe I am using external dynamic javascript. Below are the exact steps to reproduce. 1] go here https://portal.tradingwidgets.com/home/c243a158-5cc6-4843-9de7-a1f0ac104996 2] Resize the widget and then release the mouse inside/on top on the widget and you can see the mouse pointer will stick to the widget and you would need to refresh... A lot of my dynamic widgets work with javascript embedded and all the widgets are causing this problem |
I'm looking at the site you sent me to and I cannot reproduce on Chrome. What browser are you using? |
https://portal.tradingwidgets.com/home/c243a158-5cc6-4843-9de7-a1f0ac104996 I am using chrome. This occurs on edge as well. I think earlier that dashboard was missing a widget. I added it now. please see the video below of the same this one will eventually show gridster js error in dev tools once i click out of the widget |
I played around with it a little, and I see what the problem is, but I don't think it's fixable while keeping the library intact. The fix that came out with v6.0.10 was for when a gridster element was nested in an iframe, and it was as simple as firing a drop event on 'mouseleave' of the gridster element. Here the obvious fix would be to run the drop event on 'mouseout', which would drop the element whenever you leave the gridster element proper, meaning entering a child would fire that event, but that would break just about every other implementation of this library and make the UX very poor. Something that I could look into is to see if I can't somehow expose the drop event to the user, so that you could manually call it in your app. At that point it would be up to you to find a fix that works for your implementation of angular-gridster2. Would that help? |
Thanks for looking into this. As you can see, I have a lot of time & effort invested in this and this is the only one issue I need to solve. Please expose the drop event and I will see how I can use it. |
It was recommend by tiberiuzuld in this issue #233 to use the css style pointer-events:none as below. This seems to be a good option. I tried adding the css and it works as expected. Now I can freely resize and drag but I am not sure how to initialize pointer-events back on dock Basically On start of drag or resize set pointer-events: none and then at end of drag or resize set pointer-events:initial. Please help. I think this will be great solution for others as well.. gridster-item .itemDiv { //what is my-drag-in-progress class? this does not seem to fire
|
The itemResizeCallback() and itemChangeCallback() should be called at the end of a resize or drag event, my thought would be that you can use those callbacks to re-initialize pointer-events. |
Thanks. I have this working now without issues. Should apply to iframes as well. Below is what I ended up doing. i set pointer-events to none in both resize and change callback and then set to initial on mouseup event of gridster-item. itemChange(item: GridsterItem, itemComponent: GridsterItemComponentInterface) { itemResize(item: GridsterItem, itemComponent: GridsterItemComponentInterface) { enablePointer(widgteId: string) { <gridster-item [item]="item" *ngFor="let item of gridsterItemArray" (mouseup)="enablePointer(item.inputs.widgetId)"> |
Hi, |
Hi,
![bug](https://user-images.githubusercontent.com/42090428/43676037-c0a27462-97e9-11e8-87fe-6829e0e472e4.gif)
in my application I have implemented the gridster. The issue is that after some time dragging arround an item it is binded to the mouse pointer. I have created a gif which Shows the behaviour:
As you can see on every mouse drag Event I am previously getting an
in gridsterDraggable.sevice.js in line 49 ,80 and 101.
After some time the gridster then crashes at all. With the Errors:
1.
and
For the gridster Options I have the following:
and my HTML Looks like this:
I am using Angular Version 5.2.11 gridster Version 5.3.3
I even tried to use the Options whih are defined on he example site from gridster but that made no difference. Always the same issue. Does anybody knows where the issue is coming from and how to solve or prevent it?
Thanks in advance.
The text was updated successfully, but these errors were encountered: