-
Notifications
You must be signed in to change notification settings - Fork 516
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
rangeSlider widget value round issue on Safari #1254
Comments
Isn't that related to the underlying implementation @vvo ? |
The default rounding strategy for pips in nouislider is to use Math.round(). We used Number(v).toLocaleString() but on safari this led to weird results because 10.100001.toLocaleString() => '10.1000001' and on chrome it's '10' for example. Thus now we will Math.round the number before passing it to toLocaleString only if the step parameter of the slider is an integer. We use an npm module for Number.isInteger() because no IE nor safari version has it. fixes #1254
This will be released on monday |
Wow, THAT was fast. THX @vvo 👍 |
@vvo I'm still experiencing the issue on Magento demo: I'm using the latest version of IS with algoliaBundle, built today. Reopen? |
@JanPetr Magento 1 or 2? Can you provide steps to reproduce the issue, I can use the developement environement of magento 1 |
Magento 1, go to https://magento.algolia.com/women/tops-blouses.html and play a bit with slider's left handle. Cannot reproduce reliably, usually it happens around value 200, but only from time to time :( |
There was currently no precision formatting within the Slider. While sometime the computed interpolated value for the slider would be 23.0000003 we would refine Algolia with that and this would end up showing in other widgets. So we default to precision 2 within all number formatting within the slider by default. fixes #1254 (comment) and linked to https://github.com/algolia/algoliasearch- magento/issues/546
* chore(build): force rebuild, was lost because bad travis config * fix(Slider): default precision to 2 There was currently no precision formatting within the Slider. While sometime the computed interpolated value for the slider would be 23.0000003 we would refine Algolia with that and this would end up showing in other widgets. So we default to precision 2 within all number formatting within the slider by default. fixes #1254 (comment) and linked to https://github.com/algolia/algoliasearch- magento/issues/546
Released |
First things first: THX a ton for all your awesome work w/ instantsearch.js 👍
Seems there is an issue w/ the
rangeSlider
widget - only on Safari, so far tested on OS X only.To reproduce: https://community.algolia.com/instantsearch.js/documentation/#rangeslider
The text was updated successfully, but these errors were encountered: