Bug 15022 - Cell width can't be changed when the table is using table-layout:fixed
Summary: Cell width can't be changed when the table is using table-layout:fixed
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tables (show other bugs)
Version: 523.x (Safari 3)
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-08-20 10:26 PDT by James
Modified: 2007-08-27 14:58 PDT (History)
2 users (show)

See Also:


Attachments
Testcase (830 bytes, text/html)
2007-08-20 10:28 PDT, James
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description James 2007-08-20 10:26:00 PDT
Try to click the button of the following simple html page. The script should simply change the first cell's width to 50px (it worked properly in IE/Gecko/Opera). But it didn't work in Safari.

<html>
<head>
    <title>Untitled Page</title>
</head>
<body>
    <script type="text/javascript">
    
        function SetWidth()
        {
            var cell = document.getElementById("a1");
            cell.style.width = "50px";
            cell.width = "50";
            
            alert("Cell 1's width should be 50px by now.. but it isn't :(");
        }
    </script>
    <table id="tb1" border="1" style="width: 500px; table-layout: fixed">
        <tr>
            <td id="a1" style="width: 100px">
                Cell 1</td>
            <td id="a2" style="width: 100px">
                Cell 2</td>
            <td id="a3" style="width: 300px">
                Cell 3</td>
        </tr>
    </table>
    <button onclick="SetWidth()">Change Cell 1 width to 50px</button>
</body>
</html>
Comment 1 James 2007-08-20 10:28:46 PDT
Created attachment 16032 [details]
Testcase
Comment 2 Tom Brown 2007-08-27 14:47:06 PDT
This appears to have been fixed sometime between nightlies r25168 and r25239
Comment 3 mitz 2007-08-27 14:58:59 PDT
Fixed by Beth in <http://trac.webkit.org/projects/webkit/changeset/25224>.