Opened 13 years ago

Closed 13 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)

ckeditor_bug.zip (850.6 KB) - added by Chris Mullins 13 years ago.
Sample Project
ckeditor_bug_updated.zip (852.9 KB) - added by Chris Mullins 13 years ago.
Updated with Master Page Height Error
FixFor7302.patch (1.4 KB) - added by Chris Mullins 13 years ago.
Error Fix Patch
7302.patch (1.4 KB) - added by kaga 13 years ago.

Download all attachments as: .zip

Change History (10)

Changed 13 years ago by Chris Mullins

Attachment: ckeditor_bug.zip added

Sample Project

Changed 13 years ago by Chris Mullins

Attachment: ckeditor_bug_updated.zip added

Updated with Master Page Height Error

comment:1 Changed 13 years ago by Chris Mullins

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.

Changed 13 years ago by Chris Mullins

Attachment: FixFor7302.patch added

Error Fix Patch

comment:2 Changed 13 years ago by Chris Mullins

Keywords: HasPatch added
Resolution: fixed
Status: newclosed

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 13 years ago by Wiktor Walc

Component: GeneralServer : ASP.Net
Keywords: .Net Control Formatting CKEditorControl Layout removed
Resolution: fixed
Status: closedreopened

Changed 13 years ago by kaga

Attachment: 7302.patch added

comment:4 Changed 13 years ago by kaga

Owner: set to kaga
Status: reopenedreview

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 13 years ago by Wiktor Walc

Status: reviewreview_passed

@ckmullins - many thanks for debugging this issue, attaching a sample project and providing the patch!

comment:6 Changed 13 years ago by kaga

Resolution: fixed
Status: review_passedclosed

Fixed with [6686]

Note: See TracTickets for help on using tickets.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy