Widgets working on Touch Screens

36 views
Skip to first unread message

DAZ

unread,
Aug 20, 2012, 3:20:45 PM8/20/12
to rig...@googlegroups.com
Hi,

I'm using rightJS slider and colorpicker widgets on this page:

But they currently down work on touch screen devices such as the ipad.

Is there any way of getting them to work?

cheers,

DAZ

Nikolay Nemshilov

unread,
Aug 21, 2012, 10:01:00 PM8/21/12
to rig...@googlegroups.com
Hey DAZ,


Apparently the slider plugin doesn't work with the touchscreens,

I'm busy tight til the end of the next week, but i'll see if i'll be able to patch it.

Basically you could do it by yourself, you just need to find the mousedown, mousemove and mouseup events and duplicate the event listeners and make them listen to the touchstart, touchend and touchmove events. Should make it work.


--
Thanks,
Nikolay

--
You received this message because you are subscribed to the Google Groups "RightJS" group.
To view this discussion on the web visit https://groups.google.com/d/msg/rightjs/-/lqxA31YZ3eYJ.
To post to this group, send email to rig...@googlegroups.com.
To unsubscribe from this group, send email to rightjs+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rightjs?hl=en.

DAZ

unread,
Aug 22, 2012, 2:29:58 AM8/22/12
to rig...@googlegroups.com
Hey Nikolay,

I had a look at the code to try and patch it and came across this function:

$(document).on({
  // preinitializing the sliders
  ready: function() {
    $$('.rui-slider').each(function(element) {
      if (!(element instanceof Slider)) {
        element = new Slider(element);
      }
    });
  },

  mousedown:  document_mousedown,
  touchstart: document_mousedown,

  mousemove:  document_mousemove,
  touchmove:  document_mousemove,

  mouseup:    document_mouseup,
  touchend:   document_mouseup
});

.... it seems that the touch events have already been aliased, so you'd think they should work. Any idea why they wouldn't be?

cheers,

DAZ

DAZ

unread,
Sep 11, 2012, 3:42:15 PM9/11/12
to rig...@googlegroups.com
Hi Nic,

Any ideas about this? I don't mind trying to patch it myself, but as far as I can see the touch events have already been included, so I can't understand why they're not firing!

Any help in pointing me in the right direction would be very much appreciated.

cheers,

DAZ

On Monday, August 20, 2012 8:20:45 PM UTC+1, DAZ wrote:

Nikolay Nemshilov

unread,
Sep 11, 2012, 7:38:42 PM9/11/12
to rig...@googlegroups.com
Hey DAZ,

Sorry, been  quite busy recently, could you make me a ticket on github for that?

I looked at it the other day but as you said the events are there, and things seemed to work before, i'll need to dig deeper when i have time.

--
Thanks,
Nikolay

--
You received this message because you are subscribed to the Google Groups "RightJS" group.
To view this discussion on the web visit https://groups.google.com/d/msg/rightjs/-/9qVcL-EdLF8J.
Reply all
Reply to author
Forward
0 new messages