Bug 16497 - Overflow property set from JS can't be retrieved from JS
Summary: Overflow property set from JS can't be retrieved from JS
Status: RESOLVED CONFIGURATION CHANGED
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: 523.x (Safari 3)
Hardware: Mac OS X 10.4
: P2 Normal
Assignee: Nobody
URL: http://crschmidt.net/projects/webkit/...
Keywords: HasReduction
Depends on:
Blocks:
 
Reported: 2007-12-17 20:26 PST by Christopher Schmidt
Modified: 2022-08-05 14:51 PDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Christopher Schmidt 2007-12-17 20:26:33 PST
When the overflow property is set on an element, it's not possible to retrieve that property back from the element. Instead, the overflow is applied to overflow-x and overflow-y (which can be retrieved), and element.style.overflow will continue to return a null string.
Comment 1 Christopher Schmidt 2007-12-17 20:37:24 PST
IE6, IE7, FF2, FF3, and Opera 9.23 all return the value which is set for the overflow property ('scroll' in the case of the demo). FF2 and FF3 both report 'scroll' for the overflow-x / overflow-y value as well -- Opera does not (and I don't have IE handy to test).
Comment 2 David Kilzer (:ddkilzer) 2007-12-18 05:44:48 PST
(In reply to comment #1)
> IE6, IE7, FF2, FF3, and Opera 9.23 all return the value which is set for the
> overflow property ('scroll' in the case of the demo). FF2 and FF3 both report
> 'scroll' for the overflow-x / overflow-y value as well -- Opera does not (and I
> don't have IE handy to test).

MSIE 7 does not report values for overflow-x or overflow-y using the test case.

Confirmed bug with a local debug build of WebKit r28774 with Safari 3.0.4 on Mac OS X 10.4.11 (8S165).

Comment 3 Ahmad Saleem 2022-08-05 14:51:43 PDT
I am unable to reproduce this bug in Safari 15.6 using the test case from URL field:

*** STEPS TAKEN ***

Open URL and then from Developer Tools, go to Console and type:

document.getElementById("outer").style.overflow;

and it will return "scroll" rather than 'null' string as mentioned in Comment 0.

It is same across all browsers (Chrome Canary 106 and Firefox Nightly 105).

I am going to mark this as "RESOLVED CONFIGURATION CHANGED", in case if it is incorrect and this bug is reproducible or I have tested it wrong. Please reopen it. Thanks!