Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows Phone 8.1 - Double tap to select star #13

Closed
ghost opened this issue Jan 14, 2014 · 3 comments
Closed

Windows Phone 8.1 - Double tap to select star #13

ghost opened this issue Jan 14, 2014 · 3 comments
Assignees
Labels

Comments

@ghost
Copy link

ghost commented Jan 14, 2014

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...

@Phoennix
Copy link
Contributor

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 ?

@ghost
Copy link
Author

ghost commented Jan 22, 2014

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.

@javiertoledo
Copy link
Owner

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!

@javiertoledo javiertoledo self-assigned this May 25, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants