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

Prevent drag-start in IE when scrolling on an element with a scrollbar #19

Open
d2a-raudenaerde opened this issue Oct 25, 2017 · 0 comments

Comments

@d2a-raudenaerde
Copy link

Hi,

Currently, in IE11, if you mousedown on a scollbar to scroll a DIV with overflow:scroll, this registers as a start-of-drag and drop.

It can be prevented by returning early in the dragsource:

				$(element).on('mousedown', selectors.initiate, function(event) {
					if ($(event.target).is('input,select,option,button,textarea')) {
						return;
					}
					if (inScrollRange(event)) {
						console.log("No drag and drop, we are on a scrollbar!");
						return;
					}

The imlementation of inScrollRange can be taken from: http://jsfiddle.net/aKejW/

I got this to work, but it is still a bit messy. Maybe you have a better idea?

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

1 participant