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

Chrome/Split tooltip on range slider not aligned #483

Closed
dreamcasting opened this issue Dec 8, 2015 · 9 comments
Closed

Chrome/Split tooltip on range slider not aligned #483

dreamcasting opened this issue Dec 8, 2015 · 9 comments

Comments

@dreamcasting
Copy link

I'm using Chrome 47 for Windows and a range slider with split tooltips which are also set to always show. Until I click on the slider the tooltips are always misaligned, then they jump to the correct place. This is within a bootstrap modal. I've changed the tooltip CSS but then the tooltips will jump on click and be incorrect afterward.

image

The code I'm using is pretty straight up - function gradeFilter() { var slider = $("#gradeFilter").bootstrapSlider({ tooltip: 'always', tooltip_split: true });

@seiyria
Copy link
Owner

seiyria commented Dec 8, 2015

Regardless of how simple the code is, we always ask to see an example. Please show one.

@dreamcasting
Copy link
Author

You got it - sorry for the delay, had to extract the relevant code.

http://jsfiddle.net/cwssL37d/

@ctrl-f5
Copy link

ctrl-f5 commented Dec 20, 2015

I'm having the same ussie, with without the split tooltip. It's also reproducable by the given example from @dreamcasting (change tooltip_split: false).

@fleiflei
Copy link

fleiflei commented Jan 5, 2016

Having the same problem with tooltip_split:false. When initialized the tooltips inline css "margin-left" value is always set to "0px".

@goleary
Copy link

goleary commented Jul 29, 2016

Having the same issue. When the tooltip is initialized it has margin-left: 0px after I click on the tooltip it gets set to -20.5px. I am getting around the problem by calling $('#ex1Slider .tooltip-main').css({'margin-left': '-20.5px'}); after the initialization of the slider.

@sweco-senari
Copy link

@golear91 sweet workaround! 'margin-left': '-40.5px for me when using tooltip_split: false.

@sorryjack
Copy link

how to implement that css after initialization? I am having same issue.

@goleary
Copy link

goleary commented Nov 4, 2016

@sorryjack just use the code I pasted above. It is basically selecting the element using jquery and then applying a css attribute

@sorryjack
Copy link

@goleary was trying your code many times, seems not worked. then I found that it actually triggered.
then I modify the .tooltip-main to .tooltip-min and .tooltip-max cz I did tooltip_split: true

$('.filter-harga .tooltip-min').css({'margin-left': '-21px'});
$('.filter-harga .tooltip-max').css({'margin-left': '-41px'});

now it worked. thanks man.

wismill pushed a commit to wismill/bootstrap-slider that referenced this issue Nov 2, 2017
rovolution added a commit that referenced this issue Nov 9, 2017
Use `transform: translate()` instead of margin-* for the tooltips. Fix #483
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants