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

dnd-draggable == "true" prevents ng-click #34

Open
Dimanoid opened this issue Sep 20, 2015 · 9 comments
Open

dnd-draggable == "true" prevents ng-click #34

Dimanoid opened this issue Sep 20, 2015 · 9 comments

Comments

@Dimanoid
Copy link

Look at the example, if dnd-draggable set to true ng-click event never fired.
http://embed.plnkr.co/w5vP9BK3xVztYhVBe2OI/preview

You need to implement something like dnd-drag-delay option or dnd-drag-delta to start dragging after a few ms after onmousedown or after cursor were moved a few pixels away from start point with button hold pressed. Something similar is done in angular-ui-tree https://github.com/angular-ui-tree/angular-ui-tree

@Tuch
Copy link
Owner

Tuch commented Sep 20, 2015

@Dimanoid hmm, in my case this working. Maybe i do something wrong?
https://monosnap.com/file/CtfzF46MCkyiUHU0riYYpd1mYMpx3Z

@Dimanoid
Copy link
Author

Stange but I cant reproduce it too on other computer.
Sorry for disturbance.

Btw I think that has an option to delay start dragging is good anyway... Count it as a feature request :)

@Tuch
Copy link
Owner

Tuch commented Sep 21, 2015

@Dimanoid hmm, i think yes, but need more info about this point :) can you describe it?

@Dimanoid
Copy link
Author

Please check JQueryUI API, it has both options.
http://api.jqueryui.com/draggable/#option-delay
http://api.jqueryui.com/draggable/#option-distance
They are great to prevent accident start drag.

@hebedombiu
Copy link

I have the same problem. It begins drag when I click on element. And I can't check checkbox on child div.
Win8, Chrome
Which side I have to look, to fix that?

@Dimanoid
Copy link
Author

Yep its really annoying when you start dragging instead of just click because of cursor micro-movement. Can you please fix it anytime soon? Those new options will resolve this nicely.

@Tuch
Copy link
Owner

Tuch commented Oct 21, 2015

@hebedombiu, @Dimanoid You mean like 'tollerance movement' option?

@k-one-o-two
Copy link

I think that I've found the problem on Chrome in Win10, this code seems to fix it:

mousemove: function (event) {
                if (event.movementX != 0 && event.movementY != 0) {
                    this.manipulator.progress(event);
                }
            }

The problem is that Chrome fires mousemove event with zero movents, which leads to the error described above.

@Tuch
Copy link
Owner

Tuch commented Oct 28, 2015

@k-one-o-two good idea, but bad supporting for movementX property...

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

No branches or pull requests

4 participants