Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#8210 closed bug (worksforme)

Slider create callback only triggered on mousefocus leave of parent element in IE9

Reported by: joehannes Owned by:
Priority: minor Milestone: 1.9.0
Component: ui.slider Version: 1.8.17
Keywords: Cc:
Blocked by: Blocking:

Description

IE9 Slider I position some buttons to the right of the slider and have setTimeout(functionSetPosition) setup inside the create: event ... setTimeout is necessary since though create is described as being triggered after the html event is created it seems not to be so, the positioning doesn't work if I don't set the timeout. In IE, even with this workaround, it doesn't work, since the create: event seems to be triggered only when the sliders parent container element looses mouse focus.

http://jsfiddle.net/joehannes/YGE8Z/38/ ps: fiddle doesn't really work since timeout isn't called

Change History (3)

comment:1 Changed 7 years ago by joehannes

sorry, seems to be some kind of IE quirk I don't understand ... I had the issue in the following case: clear cache .. first time loading the create event was somehow triggered too soon and the slider wasn't completed as the buttons were positioned. now I found writing setTimout in IE didn't work even if I wrote the timeout simply outside the slider-constructor. I don't understand, but this seems to be an IE issue ... the jquery-UI issue still lies somehow with the point in time the create constructor callback gets called (try with cleared cache and no button images, so the buttons get painted ASAP)

comment:2 Changed 7 years ago by Scott González

Resolution: worksforme
Status: newclosed

The create event seems to be working just fine. I'm assuming you think it's broken because the positioning isn't what you expect. You can't float the slider and expect it to work properly, since it's not taking up any space...

comment:3 Changed 7 years ago by joehannes

hmm, yeah, sure you are right, I'm not good at css, rather a pure javascripter. anyway, when needs must, I need to float it because the slider is at the same line of sight (height) as some controlbuttons and the overall container needs to adjust it's size dynamically ... therefore I need to use html positioning instead of javascript if possible (unless I want to script my buttons on the right ...)

so I never actually tried this without the float property set (I needed this when I created the control buttons ... the options buttons which are positioned relatively to the slider appeared much later in the process).

conclusion: behaviour works (positioning) even with float, but only with a) a timeout set or b) the images cached and immediately calling the positioning. using create fails me if I float and position without timeout.

Note: See TracTickets for help on using tickets.