Opened 14 years ago
Closed 14 years ago
#7302 closed Bug (fixed)
CKEditor .Net Server control Height and Width Parameters do not work if attributes are placed in front of the Control ID
Reported by: | Chris Mullins | Owned by: | kaga |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | Server : ASP.Net | Version: | 3.5.2 |
Keywords: | HasPatch | Cc: | cmullins@… |
Description
CKEditor .Net Server control Height and Width Parameters do not work if attributes are placed in front of the Control ID
Version of control and ckeditor are both 3.5.2
Example: The following declaration sets the width and height correctly: <CKEditor:CKEditorControl ID="CKEditor1" runat="server" Height="800" Width="400" ></CKEditor:CKEditorControl>
This one does not set the width and height at all: <CKEditor:CKEditorControl Height="800" Width="400" ID="CKEditor1" runat="server"></CKEditor:CKEditorControl>
The only difference is th ordering of the attributes. Happens in all browsers.
Attachments (4)
Change History (10)
Changed 14 years ago by
Attachment: | ckeditor_bug.zip added |
---|
Changed 14 years ago by
Attachment: | ckeditor_bug_updated.zip added |
---|
Updated with Master Page Height Error
comment:1 Changed 14 years ago by
The bug with height and width also affect any CKEditorControl in a ContentPlaceholder when on a page using a master page regardless of the order of the parameters.
comment:2 Changed 14 years ago by
Keywords: | HasPatch added |
---|---|
Resolution: | → fixed |
Status: | new → closed |
After some debugging I figured out why the properties were not being set, although the order of the attributes is bewildering, this fix does fix that as well as problem with masterpages.
The root of the problem is that a couple of properties (config being the cause of the error) use the ViewState for persistence, and the key name had the ClientID appended, but the ClientID is not finalized until later in the life cycle than when the properties are set declaratively, so it works as long as the client id never changes, but with master page it starts out as one thing when the controls is first loaded, and then changes later, so the next time the config is accessed after it changes it appears to have not been set ever, so it reloads it thus wiping out the values that were set.
The easy fix is to remove the client id from the key name, it is totally unnecessary as far as I know each control instance gets it's own viewstate so one instance cannot affect another. I tested with two controls on the same page with different properties, and they seem to work just fine.
The
comment:3 Changed 14 years ago by
Component: | General → Server : ASP.Net |
---|---|
Keywords: | .Net Control Formatting CKEditorControl Layout removed |
Resolution: | fixed |
Status: | closed → reopened |
Changed 14 years ago by
Attachment: | 7302.patch added |
---|
comment:4 Changed 14 years ago by
Owner: | set to kaga |
---|---|
Status: | reopened → review |
Yes, of course ClientID is here unnecessary, and even causing bugs. Your patch works fine. Thanks for the advice and taking the time to diagnose the problem.
comment:5 Changed 14 years ago by
Status: | review → review_passed |
---|
@ckmullins - many thanks for debugging this issue, attaching a sample project and providing the patch!
comment:6 Changed 14 years ago by
Resolution: | → fixed |
---|---|
Status: | review_passed → closed |
Fixed with [6686]
Sample Project