material icon indicating copy to clipboard operation
material copied to clipboard

md-slider dragging broken when jQuery loaded in 0.7.1

Open jelbourn opened this issue 11 years ago • 8 comments

When jQuery is loaded on the page, dragging the slider with the mouse is broken.

http://jsbin.com/recepu/5/edit

jelbourn avatar Jan 30 '15 23:01 jelbourn

+1, Same problem here - Chrome 40 (Desktop) on Win7 (64) and 0.7.1

maxee avatar Feb 01 '15 15:02 maxee

It does work for me - Chrome 40, Linux. Using commit f1a4bcc3d1cbd89b72f2eca120ffa6523f0f8c27.

TheHippo avatar Feb 03 '15 06:02 TheHippo

Update: the issue only occurs when jQuery is loaded on the page.

jelbourn avatar Feb 03 '15 18:02 jelbourn

Looks like this has to do with the dispatchEvent function in gesture.js. One of the users found that they could fix the issue by triggering the event to the jQuery-wrapped event target:

if (window['jQuery']) {
  window['jQuery'](eventPointer.target).trigger(eventObj);
}

jelbourn avatar Feb 03 '15 18:02 jelbourn

There's a pull request open to fix this. On Tue, Feb 3, 2015 at 11:20 Jeremy Elbourn [email protected] wrote:

Looks like this has to do with the dispatchEvent function in gesture.js. One of the users found that they could fix the issue by triggering the event to the jQuery-wrapped event target:

if (window['jQuery']) { window'jQuery'.trigger(eventObj); }

— Reply to this email directly or view it on GitHub https://github.com/angular/material/issues/1352#issuecomment-72704617.

ajoslin avatar Feb 03 '15 18:02 ajoslin

@ajoslin - that PR looks good (with some tweaks). Are you planning on merging it or should I do that ?

ThomasBurleson avatar Feb 03 '15 19:02 ThomasBurleson

Hi, I still have this problem with jQuery 2.0.2 and the latest version - 1.0.0-rc2. any ideas?

Ronani avatar Nov 01 '15 16:11 Ronani

@Ronani could you open a new issue with a reproduction?

jelbourn avatar Nov 02 '15 19:11 jelbourn