swooningfish / jscrollpane

Automatically exported from code.google.com/p/jscrollpane
0 stars 0 forks source link

Make it work correctly with custom fonts (using @font-face) #165

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Hi! I noticed a bug in your plugin, I'm using it with a div and some custom 
fonts, using @font-face (css) and your plugin seems to get the height of the 
div without using custom fonts, in facts if I delay the plugin (using 
setTimeout) it get the correct height, but the original scrollbar style is 
displayed untill the plugin starts.

Patrick

Original issue reported on code.google.com by patrick....@gmail.com on 19 Jan 2010 at 4:48

GoogleCodeExporter commented 9 years ago
jScrollPane has no way to notice when it's content changes size. I guess this 
is what
is happening with @font-face. You can work around it by initialising on ready 
and
then reinitialising jScrollPane after a short delay. 

If there is any event triggered by the browser when the referenced font is 
loaded and
applied then you could hook into this and reinitialise on this event rather than
using a timer... I haven't researched whether such an event exists though...

Original comment by kelvin.l...@gmail.com on 19 Jan 2010 at 8:06

GoogleCodeExporter commented 9 years ago
mhm... ok I'll try your solution :)

Thanks ;)

Original comment by patrick....@gmail.com on 19 Jan 2010 at 9:07

GoogleCodeExporter commented 9 years ago
I have just announced the beta of a completely rewritten version of jScrollPane:

http://groups.google.com/group/jscrollpane/browse_thread/thread/c1bc1bf63e3f80d8

Please test and reply on the list if you are still having this issue,

Thanks,

Kelvin

Original comment by kelvin.l...@gmail.com on 17 Aug 2010 at 4:16