asvd / dragscroll

micro library for drag-n-drop scrolling style
http://asvd.github.io/dragscroll/
MIT License
1.1k stars 166 forks source link

Mobile is a no-go, breaks <select> boxes #51

Open crh3675 opened 5 years ago

crh3675 commented 5 years ago

Just try on an iPhone

crh3675 commented 5 years ago

nodrag attribute causes weird behavior. I move the functionality and works perfectly!


              (cont = el.container || el)[addEventListener](
                  mousedown,
                  cont.md = function(e) {
                      if (!el.hasAttribute('nochilddrag') ||
                          _document.elementFromPoint(
                              e.pageX, e.pageY
                          ) == cont
                      ) {
                          pushed = 1;
                          lastClientX = e.clientX;
                          lastClientY = e.clientY;
                          var tag = e.target;
                          if (!tag.hasAttribute('nodrag')) {
                            e.preventDefault();
                          }
                      }
                  }, 0
              );```