Skip to main content

Bug Tracker

Side navigation

#2953 closed bug (fixed)

Opened May 29, 2008 01:26PM UTC

Closed May 05, 2009 11:42PM UTC

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)
  • patch_curCSS.txt (0.6 KB) - added by lrbabe May 29, 2008 01:28PM UTC.

    proposed patch for src/core.js curCSS function

  • patch_testCss.txt (0.9 KB) - added by lrbabe May 29, 2008 01:27PM UTC.

    patch for test/unit/core.js

  • test case.zip (112.8 KB) - added by lrbabe May 29, 2008 01:26PM UTC.

    test case

Change History (2)

Changed May 29, 2008 11:44PM UTC by flesler comment:1

component: coredimensions
owner: → brandon

Changed May 05, 2009 11:42PM UTC by brandon comment:2

resolution: → fixed
status: newclosed

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