Opened 11 years ago

Closed 11 years ago

#3605 closed bug (fixed)

actualSize in ui.slider not calculated correctly if element is hidden

Reported by: FreakCERS Owned by:
Priority: major Milestone: 1.8
Component: ui.slider Version: 1.6rc2
Keywords: actualSize Cc:
Blocked by: Blocking:

Description

If the slider element (or it's parents) are hidden via display: none; its actualSize is calculated to be 0x0 instead of the dimensions set in css.

This has the effect that the slider does not honor its startValue, and you cannot use moveTo before it's displayed again.

I suggest you add an optional option "css", "size" or similar, that allows you to pass as argument the actual size of the slider element, and having this used instead of outerWidth() and outerHeight() (if present, obviously)

Change History (3)

comment:1 Changed 11 years ago by Jörn Zaefferer

Milestone: TBD1.6
Owner: paul deleted
Priority: minormajor
Status: newassigned
Type: enhancementbug

Slider shouldn't break just by hiding it.

comment:2 Changed 11 years ago by rdworth

Milestone: 1.71.8

comment:3 Changed 11 years ago by rdworth

Resolution: fixed
Status: assignedclosed

This was fixed when the slider plugin was completely refactored after 1.6rc2. Slider size is now totally fluid, and handle positions are set with a percentage of that container width.

Note: See TracTickets for help on using tickets.