When a frameset's frame is resized by the user, the value of the "rows" or "cols" attribute are not set with the new current value but, rather stays at the original static document value. This is not critical since these values can be deduced using frame size. Yet, if a user resize a frame and we want to reset it to the original value using JavaScript then, this won't work since the attribute value being still at the original value, setting it to the same 'original' value will not trigger a DOM update. The ideal fix would be to always reflect the current size in "rows" and "cols" attributes. A workaround would be to force a DOM update even if we set the attribute with the same value.
Created attachment 51603 [details] Test case
Created attachment 60877 [details] Demonstrates the bug with retrieving and setting frameset cols attribute with JS Demonstrates that the bug effects both retrieving and setting frameset attributes, and that it makes it impossible to set frameset dimensions correctly with JS.
See my attached demo case. Current versions of Safari and Chrome on both Mac OS X and Windows are all affected. This bug is actually critical as it makes it impossible to set frameset dimensions with JS. In addition to failing to retrieve the dimensions after the frame border has been moved by the user, Webkit browsers also set the cols and rows dimensions incorrectly if the frame border has been moved. The amount of the move by the user is added as a positive or negative offset, producing broken results. There appears to be no workaround for this because the browsers are both reporting the current values incorrectly and applying an offset to any values set with JS.
Created attachment 60880 [details] Test Case Direct link to test case demonstrating and explaining the bug and showing its negative consequences.
Chrome version 13.0.782.220 m Windows Safari version 5.1 (6534.50) Mac This bug is very critical and reproduced on both browsers. Steps to reproduced: 1) Please open this page: http://www.w3schools.com/jsref/tryit.asp? filename=tryjsref_frameset_rows 2) Resize frame 3) Click on buttons "Restore" (set value to rows '50%, 50%') or "Change" (set value to rows '30%, 70%') Actual Behavior: When setting values to rows after resizing, frames must match the exact size specified in frameset rows Expected Behavior: When setting values to rows after resizing, frames must match the exact size specified in frameset rows
Mistake in Actual Behavior: When setting values to rows after resizing, frames no match the exact size specified in frameset rows
Page for test http://www.w3schools.com/jsref/tryit.asp?filename=tryjsref_frameset_rows
Several years past and this bug haven't been fixed yet. Still works in chrome 39.0.2171.95 m. Can be tested on page http://www.w3schools.com/jsref/tryit.asp?filename=tryjsref_frameset_rows
Taking: https://www.w3schools.com/jsref/tryit.asp?filename=tryjsref_frameset_rows *** Chrome Canary 116 & Safari 16.5 *** 1) Resize 'Frame A' to bottom 2) Click 'Change row size' and then restore. Result: user resize remains and 'restore' to user resize *** Firefox Nightly 115 *** Disregard user resize _________________ Just wanted to share my testing result, if I did incorrect testing, please share updated (would be good for learning).