Skip to main content

Bug Tracker

Side navigation

#12324 closed bug (fixed)

Opened August 17, 2012 01:05AM UTC

Closed August 20, 2012 02:49AM UTC

cssNormalTransform can produce wrong values

Reported by: anonymous Owned by: mikesherov
Priority: high Milestone: 1.8.1
Component: css Version: 1.8.0
Keywords: Cc:
Blocked by: Blocking:

In jQuery 1.8 there is an cssNormalTransform property that holds numerical default values for CSS properties whose “computed style” evaluates to “normal”. These fixed values may be just wrong in some cases. E.g. for “line-height” the CSS spec clearly states that the the computed value in such a case is “normal” and the user agent can choose a “reasonable” value. Values between 1.0 to 1.2 are recommended.

In most cases the value may be 1.0. But for some elements (e.g. <textarea>) it is different in most browsers.

The same may be true for “line-height”.

jQuery should just return “normal” in these cases (as it did in previous versions).

Attachments (0)
Change History (5)

Changed August 17, 2012 01:18AM UTC by mikesherov comment:1

component: unfiledcss
owner: → anonymous
status: newpending

Can you provide a test case that proves line-height is wrong in certain cases?

Changed August 17, 2012 10:15AM UTC by anonymous comment:2

status: pendingnew

Okay, here’s a test case:

As you can see, jQuery calculates the “line-height” as “1”. When you hover the textarea with the mouse, “line-height: 1” is explicitly set via CSS. If jQuery was correct, there should be no noticeable difference, but you can see that the actual line height changes.

Changed August 17, 2012 11:10AM UTC by mikesherov comment:3

milestone: None1.8.1
owner: anonymousmikesherov
priority: undecidedhigh
status: newassigned

Thanks! Fix to come shortly.

Changed August 19, 2012 08:05PM UTC by mikesherov comment:4

Changed August 20, 2012 02:49AM UTC by Mike Sherov comment:5

resolution: → fixed
status: assignedclosed

Fix #12324, line-height "normal" isn't always "1". Close gh-898.

Changeset: 9f86dc922ed832337d246d7baf8fd397dc837346