Bug Tracker

Opened 15 years ago

Closed 14 years ago

#2953 closed bug (fixed)

Strange behavior of opera's getPropertyValue on element with display none

Reported by: lrbabe Owned by: brandon
Priority: major Milestone: 1.3
Component: dimensions Version: 1.2.5
Keywords: opera, getPropertyValue, width Cc:
Blocked by: Blocking:

Description

Opera returns wrong values when using computedStyle.getPropertyValue of width or height on an element with display:'none' : always 0px.

When using elem.currentStyle instead, values are correct.

After seting the width and height by javascript, the correct value is returned since elem.style[ 'widht' ] is used.

This behavior causes some show effect of enchant to fail.

See attached test case, patch for test/unit/core.js and proposed patch for src/core.js

Tested with Opera 8 and Opera 9.5

Attachments (3)

test case.zip (112.8 KB) - added by lrbabe 15 years ago.
test case
patch_testCss.txt (872 bytes) - added by lrbabe 15 years ago.
patch for test/unit/core.js
patch_curCSS.txt (625 bytes) - added by lrbabe 15 years ago.
proposed patch for src/core.js curCSS function

Download all attachments as: .zip

Change History (5)

Changed 15 years ago by lrbabe

Attachment: test case.zip added

test case

Changed 15 years ago by lrbabe

Attachment: patch_testCss.txt added

patch for test/unit/core.js

Changed 15 years ago by lrbabe

Attachment: patch_curCSS.txt added

proposed patch for src/core.js curCSS function

comment:1 Changed 15 years ago by flesler

Component: coredimensions
Owner: set to brandon

comment:2 Changed 14 years ago by brandon

Resolution: fixed
Status: newclosed

Just tested with jQuery SVN and it works as expected in Opera.

Note: See TracTickets for help on using tickets.