Skip to main content

Search and Top Navigation

#10725 closed bug (fixed)

Opened December 13, 2014 10:53PM UTC

Closed April 08, 2015 05:17PM UTC

Last modified April 23, 2015 11:20AM UTC

Draggable: Draggable elements receive an explicit height in Firefox only

Reported by: orfc Owned by: tj.vantoll
Priority: minor Milestone: 1.12.0
Component: ui.draggable Version: 1.11.2
Keywords: regression Cc:
Blocked by: Blocking:
Description

Firefox is v34.0.5

Made a draggable composed of two parts. Header (with the handle) and content. A button in the header should hide/show the content.

http://jsfiddle.net/cdv5bLLh/

jquery ui v.1.10.3, works ok in firefox,

http://jsfiddle.net/ck93q4of/53/

jquery ui v.1.11.2, works before dragging in firefox, but dragging then gives height css property a set value, so hiding/showing alters the display of the content but the containing box won't change in size (as the height property isn't auto anymore)

Looking through the new code it seems a call to normalizeRightBottom sets the height to a calculated value if the right and bottom position values aren't detected as "auto". Unfortunately firefox never returns values as "auto"

https://developer.mozilla.org/en/docs/Web/API/window.getComputedStyle#Notes

''In Firefox, properties with the value auto return the used value, not the value auto''

Attachments (0)
Change History (13)

Changed December 13, 2014 10:59PM UTC by orfc comment:1

Whoops, make the version that works in firefox as http://jsfiddle.net/cdv5bLLh/2/

Changed December 15, 2014 08:47PM UTC by tj.vantoll comment:2

status: newopen
summary: draggble error in firefox + jquery 1.11.2. NormalizeRightBottom call overrides height "auto" value.Draggable: Draggable elements receive an explicit height in Firefox only

I would agree that we shouldn't set

height
unless we need to. I verified that the
this.helper.css( "bottom" )
call in
_normalizeRightBottom()
returns
"auto"
in Chrome but a pixel amount (e.g.
"-142px"
) in Firefox.

This changed in 1.11.2 per this commit: https://github.com/jquery/jquery-ui/commit/8eca7b8f45885d20c13f1bf64cad8bee5fc1d5c5.

Changed December 18, 2014 04:43PM UTC by scottgonzalez comment:3

#10729 is a duplicate of this ticket.

Changed December 23, 2014 03:45AM UTC by mikesherov comment:4

Firefox is following the spec here in that it uses the "resolved value" which for trbl is always a pixel value. There is currently no way in the CSSOM to know simultaneously whether an element has auto applied or not. We need to accept one of two answers: 1. Auto height is broken. or 2. Right/bottom is broken.

I'll go to the CSS working group with this in the new year, but don't expect any miracles ;)

Scott, what do you want to do here?

Changed December 23, 2014 12:47PM UTC by scottgonzalez comment:5

I'd say we revert 8eca7b8f45885d20c13f1bf64cad8bee5fc1d5c5, close #7772 as a duplicate of #3011, and continue to leave #3011 open for the possibility of eventually adding an option to make this work.

Changed December 23, 2014 01:38PM UTC by tj.vantoll comment:6

Replying to [comment:5 scott.gonzalez]:

I'd say we revert 8eca7b8f45885d20c13f1bf64cad8bee5fc1d5c5, close #7772 as a duplicate of #3011, and continue to leave #3011 open for the possibility of eventually adding an option to make this work.

+1

Changed December 25, 2014 04:45PM UTC by mikesherov comment:7

owner: → mikesherov
status: openassigned

Ok. I'll do that then.

Changed April 05, 2015 02:58PM UTC by tj.vantoll comment:8

#11776 is a duplicate of this ticket.

Changed April 05, 2015 02:59PM UTC by tj.vantoll comment:9

Changed April 05, 2015 03:41PM UTC by tj.vantoll comment:10

keywords: → regression
owner: mikesherovtj.vantoll

Changed April 08, 2015 05:17PM UTC by TJ VanToll comment:11

resolution: → fixed
status: assignedclosed

Revert "Draggable: Set explicit width/height instead of right/bottom"

This reverts commit 8eca7b8f45885d20c13f1bf64cad8bee5fc1d5c5.

Fixes #10725

Changeset: d0ea32e3ad613eaaa523d0c88c776dab2b26b25f

Changed April 08, 2015 05:18PM UTC by tj.vantoll comment:12

milestone: none1.12.0

Changed April 23, 2015 11:20AM UTC by scottgonzalez comment:13

#12232 is a duplicate of this ticket.