Materialize select and dropdown: Touch event selecting wrong item

前端 未结 3 696
小鲜肉
小鲜肉 2021-01-07 09:02

This bug occurs not just in my code, but also on the Materialize documentation site, so I will use their code as an example:

3条回答
  •  半阙折子戏
    2021-01-07 09:19

    After hours of trying, I found the answer: Stop propagation on touchend event, specifically

      $('li[id^="select-options"]').on('touchend', function (e) {
         e.stopPropagation();
      }); 
    

    Thanks for your attention and have a nice day.

提交回复
热议问题