#171: Unable to set textfield char width to 20
----------------------------------------------+-----------------------------
  Reporter:  [EMAIL PROTECTED]  |       Owner:  martinkou    
      Type:  Bug                              |      Status:  assigned     
  Priority:  Normal                           |   Milestone:  FCKeditor 2.6
 Component:  General                          |     Version:  FCKeditor 2.4
Resolution:                                   |    Keywords:  SF Confirmed 
----------------------------------------------+-----------------------------
Comment (by martinkou):

 I've done some investigations today, the nature of this ticket is similar
 to #617 and so the extent of changes required would be pretty large.

 The issue originates from IE itself. Say, you have an <input type="text">
 DOM node, and you assign a size="20" attribute to it in JavaScript, then
 the input node's HTML code would not be changed. i.e. the size="20" would
 not appear in document.body.innerHTML at all. The attribute would also
 appear to be undefined when you try to examine it in JavaScript via DOM
 methods. These cause problems when the user tries to examine the text box
 again by opening the text field dialog box, or examine the HTML code in
 source mode.

 But unlike #617, there's one more way for this IE bug to present itself
 for this ticket. When you set the innerHTML of any element (say,
 document.body) with an <input type="text" size="20">, IE would still
 automatically ignore the size="20" attribute it got from the HTML code.
 So, even if we've got the DOM->HTML part right (i.e. the user can see
 size="20" in Source mode), the attribute would still disappear if the user
 presses the Source button again and see the text box in WYSIWYG mode.

 If a fix were to be implemented, then at least the following have to be
 changed:
  1. The text box dialog - it must read and write to an alternative size
 attribute since you can't set the value to 20 in the real size attribute.
  1. FCKXHtml - it must be able to somehow see the alternative size
 attribute and convert it to a real size attribute in the HTML string
 output, when the user switches from WYSIWYG to Source mode or when the
 user submits the HTML back to the server.
  1. FCK.SwitchEditMode() - it must be able to convert any <input
 type="text" size="20"> to the alternative size attribute when switching
 from Source mode to WYSIWYG mode since setting size="20" in HTML code is
 useless.

 The patch in #617 has only implemented point 2 and the changes were
 already deemed too extensive for 2.6. So maybe this ticket should be left
 for 2.7 as well?

-- 
Ticket URL: <https://dev.fckeditor.net/ticket/171#comment:5>
FCKeditor <http://www.fckeditor.net>
The text editor for Internet
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
FCKeditor-Trac mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fckeditor-trac

Reply via email to