googlearchive / paper-slider

A slider à la Material Design
16 stars 18 forks source link

Drag does not work #11

Closed fineline closed 10 years ago

fineline commented 10 years ago

Installed paper-slider into a prototype I'm developing, with the command

bower install Polymer/paper-slider

Although I could tap to move the circle, dragging did not work - circle expands but does not move.

After investigating the difference with the (working) demo on polymer-project.org, I could see touch-action attributes on the working version. Looking back through the GIT history I could see a commit from azakus 3 days ago which remove these, commented "Use new trackx event". I thought some other dependencies may have changed so I cleared my components and did a full bower install, still no joy.

I looked at the dependencies generated in my bower.json file and found some were ~3.4.0 and some ~3.5.0. I reset them to =3.4.0 and reinstalled (I could see it was pulling in some other 3.5.0 dependencies). Paper-slider now has touch-action attributes again and dragging works, so I have my workaround. But anyone else using paper-slider with the default install instructions on polymer-project.org will be broken, as I was.

General question: is there currently a concept of a "stable" release, and if so a best practice for how developers can stick with it? I know this is all fairly early stage, but there was kind of a splash at IO. Watching the keynote got me interested in this. Any recommendations? Just want to stick with what is published (and working) on the polymer-project demo pages. Thanks.

dfreedm commented 10 years ago

paper-slider 0.3.5 depends on polymer 0.3.5, which includes a new codepath for touchevents that does not require the touch-action attribute.

The only way for your case to occur is if something has polymer version set to 0.3.4 or below.

Can you show how your setup got into that state?

fineline commented 10 years ago

Just did another complete from-scratch test and can confirm paper-slider now works out of the box.

fineline commented 10 years ago

In case someone else has this problem, I have found another contributing factor which can still recreate it. If you have your bower directory called something other that bower_components (in my case I had a project where it was set up using .bowerrc to be just "components") the slider handle does not drag. Changing dir name and accompanying platform script tag src and and hrefs on imports to bower_components made it work again.