jQuery UI — buttonset buttons don't always work on first click

后端 未结 2 944
不思量自难忘°
不思量自难忘° 2021-02-19 22:18

I am using a jQuery UI buttonset (based on a few radio buttons.) Everything works pretty fine except sometimes when you click on one of the buttons nothing happens (just as if y

2条回答
  •  谎友^
    谎友^ (楼主)
    2021-02-19 22:35

    This happens for me too.

    I think the problem is that you have to hold your mouse still when clicking the button, or it will not work.

    For example, try clicking the button while moving your mouse at a slow, steady pace. The button won't work unless the mouse is barely moving. Also try dragging the button even just one pixel, then releasing.

    The site you came across that works seems to use mousedown to avoid this problem. They are also using an older version of jQuery UI, which might be a factor.

提交回复
热议问题