Closed Bug 376601 Opened 18 years ago Closed 16 years ago

When table-layout=fixed attaching a child of 'input' type to cell will change width of columns

Categories

(Core :: Layout: Tables, defect)

defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: kes-kes, Unassigned)

Details

(Keywords: testcase)

Attachments

(1 file)

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; ru; rv:1.8.1.3) Gecko/20070309 Firefox/2.0.0.3 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; ru; rv:1.8.1.3) Gecko/20070309 Firefox/2.0.0.3 This example based on http://www.mozilla.org/access/dhtml/spreadsheet This example works fine <html xmlns="http://www.w3.org/1999/xhtml" xmlns:wairole="http://www.w3.org/WAI/PF/GUIRoleTaxonomy#" xmlns:aaa="http://www.w3.org/wai/pf/GUIStateTaxonomy#" <head id='scripts'> <script type="text/javascript"> function doEdit(event, cell ) { var inputField = document.createElement("input"); inputField.style.border= 0; var parentStyle = getComputedStyle(cell, ""); var parentWidth = parentStyle.getPropertyValue("width"); var dataNode = null; var editData = ""; if (cell.hasChildNodes() ) { dataNode = cell.firstChild; cell.removeChild(dataNode); editData = dataNode.data; } cell.saveData = editData; cell.appendChild(inputField); inputField.setAttribute("value",editData); inputField.style.width= parentWidth; cell.editMode = "true"; } function main() { //var id= document.getElementById('table2'); //id.style.tableLayout='fixed'; } onload= main; </script> </head> <body style="height: 100%; position: absolute; margin: 0px 0px 0px 0px;"> <table cellspacing="0" border="2" tabindex="0" id="table2" role="wairole:grid" style="table-layout: fixed; width: 500px;"> <thead> </thead> <tbody> <tr> <td tabindex="-1" role="wairole:gridcell" aaa:selected="false" ondblclick="doEdit(event,this,4);">test</td> <td tabindex="-1" role="wairole:gridcell" aaa:selected="false" ondblclick="doEdit(event,this,5);">test</td> </tr> <tr> <td tabindex="-1" role="wairole:gridcell" aaa:selected="false" ondblclick="doEdit(event,this,4);" >test</td> <td tabindex="-1" role="wairole:gridcell" aaa:selected="false" ondblclick="doEdit(event,this,5);" >test</td> </tr> </tbody> </table> </body> Reproducible: Always Steps to Reproduce: 1. uncomment lines in function 'main' 2. remove 'table-layout: fixed;' from style attribute of the table Actual Results: column width are changes Expected Results: column width must not change 1) Double click a cell to run programm 2) First and second cases works fine, if 'width' property are removed from style attribute of the table
Component: View Source → Layout: Tables
OS: Windows XP → All
Product: Firefox → Core
QA Contact: view.source → layout.tables
Hardware: PC → All
Second case: Column width still are changed if you click column in first and second row BUT column width MUST NOT be changed
this is wfm with current trunk
Keywords: testcase
Status: UNCONFIRMED → RESOLVED
Closed: 16 years ago
Flags: in-testsuite?
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: