Closed Bug 520774 Opened 15 years ago Closed 8 years ago

element offsetWidth calculated incorrectly (jQuery's :visible filter not applied to all visible elements)

Categories

(Core :: DOM: Core & HTML, defect)

defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: piotr.findeisen, Unassigned)

References

()

Details

(Keywords: regression, testcase)

Attachments

(1 file)

User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.3a1pre) Gecko/20091006 Minefield/3.7a1pre
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.3a1pre) Gecko/20091006 Minefield/3.7a1pre

The page contains several <li> elements with css "display: inline" rule. The elements have varying height due to different font-size of contained elements.

When "li:visible" css filter is applied through jQuery (it determines visible elements by checking that offsetWidth and offsetHeight are non zero) not all displayed <li> elements are matched.

The page http://students.mimuw.edu.pl/~pf219427/firefox-css-bug-workaround.html is very similar to http://students.mimuw.edu.pl/~pf219427/firefox-css-bug.html with small formatting changes, yet it does not trigger such behavior.

Reproducible: Always

Steps to Reproduce:
1. http://students.mimuw.edu.pl/~pf219427/firefox-css-bug.html
2. wait 0.5 s after page load for jQuery to remove all "li:visible" elements

Actual Results:  
there are some visible elements left

Expected Results:  
there is nothing visible left as on http://students.mimuw.edu.pl/~pf219427/firefox-css-bug-workaround.html
Component: General → DOM: Core & HTML
OS: Linux → All
Product: Firefox → Core
QA Contact: general → general
Hardware: x86 → All
Version: unspecified → Trunk
2007-06-20 nightly was good, 2007-06-21 nightly shows this bug. The only thing in that range that seems possible is bug 367177.
Blocks: 367177
Status: UNCONFIRMED → NEW
Ever confirmed: true
Attached file testcase
Notice how #a.offsetWidth is 0. I think that should be 45, like the first span.
User Agent 	Mozilla/5.0 (X11; Linux x86_64; rv:49.0) Gecko/20100101 Firefox/49.0
Build ID 	20160527030220

Works on latest Nightly. All the visible elements are removed by jQuerry.

Not sure what the testcase from comment 2 represents, but the #a.offsetWidth has a value of 46 and not 0 as it was at that moment.
Considering these I will close the bug. If anyone can still reproduce the issue, please reopen it.
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: