Closed Bug 573787 Opened 15 years ago Closed 15 years ago

Changing an element's specific style by associative array is not applied!

Categories

(Core :: JavaScript Engine, defect)

x86
Linux
defect
Not set
major

Tracking

()

RESOLVED INVALID

People

(Reporter: donrhummy, Unassigned)

Details

User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3 Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3 The following code will not be applied immediately, despite the fact that it can read the property and should be able to set it as well. It requires some other visual thing to occur (within the document window) for it to work! [code] var myDiv = document.getElementById( "myDiv" ); //This is NOT immediately applied! myDiv.style[ "width" ] = "200px"; [/code] Reproducible: Always Steps to Reproduce: 1. Try to change the width of a element by using associative array notation Actual Results: Does not change unless another thing occurs (such as popping up an alert box and then repositioning the element). Expected Results: immediate change of the style.
Works fine for me. Can you post a complete testcase (using the "Add an attachment" link) showing the problem?
I apologize, you can remove this. The issue was actually with the "src" of an image was taking a while to load (longer than it took to get to the next statement which used the width), so that's why it was not being set immediately.
Status: UNCONFIRMED → RESOLVED
Closed: 15 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.