javiertoledo/bootstrap-rating-input

Windows Phone 8.1 - Double tap to select star

Opened this issue · 3 comments

Hi,

On windows phone 8.1, i need to double tap the star to make it selectable. The "onclick" event is triggered but the star doesn't appear selectable...

Hi,

I had the "double tap" problem on a Surface 2 with Windows 8.1 RT due to the behavior of Internet Explorer.
Adding the css "-ms-touch-action: none;" on each star did the trick (as an exemple, here is the commit on my fork : Phoennix@618e312 ).

On the actual version, it's on line 38 of bootstrap-rating-input.js. It should look like this :

stars += ['<span class="glyphicon glyphicon-star-empty" data-value="', i, '" style="-ms-touch-action: none;"></span>'].join('');

Could you try this and let me know if it works on your Windows Phone ?

Dear Javier,

Thank you very much. Works like a charm!

One more thing, do we have callbacks so when I click on a star I get information about the star value that was clicked and a function that will be executed with that value as a parameter ?

Thanks in advance,
Bruno

Date: Wed, 22 Jan 2014 05:27:23 -0800
From: notifications@github.com
To: bootstrap-rating-input@noreply.github.com
CC: bruno.falcao@live.com
Subject: Re: [bootstrap-rating-input] Windows Phone 8.1 - Double tap to select star (#13)

Hi,

I had the "double tap" problem on a Surface 2 with Windows 8.1 RT due to the behavior of Internet Explorer.

Adding the css "-ms-touch-action: none;" on each star did the trick (as an exemple, here is the commit on my fork : Phoennix/bootstrap-rating-input@618e312 ).

On the actual version, it's on line 38 of bootstrap-rating-input.js. It should look like this :

stars += [''].join('');

Could you try this and let me know if it works on your Windows Phone ?


Reply to this email directly or view it on GitHub.

Hi @brunofalcao custom events are not implemented yet, but on #10 I wrote a comment with a workaround that could help you to attach callbacks to most events in star elements.

The problem about double click discussed here happens on most mobile devices because the first click activates only the hover event and you need a second one to fire the click event. If I find some time I'll write a general fix for this issue, deactivating hover on moble devices or using the touch-action property as @Phoennix suggested.

Thanks for your feedback and happy coding!