Opened 12 years ago
Closed 12 years ago
#10218 closed Bug (invalid)
Image cmbAlign Select Box Choice Disappearing in IE, Chrome, and Opera (Not Firefox)
Reported by: | Jack Herr | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | UI : Dialogs | Version: | 4.1 RC |
Keywords: | Image UI cmbAlign | Cc: |
Description
This is the first time I am reporting what I believe to be a bug. Please forbear on mistakes.
The cmbAlign select box choice made by a user when creating an image is not sustained when the image is edited if the items and default for the box are configured in the dialogDefinition event. The select box value appears as a blank. It can be reselected but disappears as a style if it is not explicitly reselected by the user. This occurs in IE, Chrome, and Opera. Not in Firefox.
If the select box is not configured, this problem does not occur.
This causes a particular problem in 4.1RC if one manually authorizes content using allowedContent and forces the need for the float style (such as: "img [!src, alt] {!float};"). In this case, the image will eventually disappear if an innocent user simply assumes that his or her previous selection will be remembered.
Here is the relevant code used to configure the box:
CKEDITOR.on("dialogDefinition", function(e) { var DialogName = e.data.name; var DialogDefinition = e.data.definition; var DialogTab; var DialogElement; if (DialogName == "image") { DialogTab = DialogDefinition.getContents("info"); DialogElement = DialogTab.get("cmbAlign"); DialogElement["label"] = "Image Alignment"; DialogElement["items"] = [ ["Right"], ["Left"] ]; DialogElement["default"] = "Right"; } });
Change History (3)
comment:1 Changed 12 years ago by
comment:2 Changed 12 years ago by
I am very, very sorry. I altered the two lines of code as follows, and everything works perfectly in all browsers with the override configuration:
DialogElement["items"] = [ ["Left", "left"], ["Right", "right"] ]; DialogElement["default"] = "right";
comment:3 Changed 12 years ago by
Resolution: | → invalid |
---|---|
Status: | new → closed |
If the cmbAlign dialog element "items" in the above code block is commented out, the dialog displays the default selection options, which are <not set>, Left, and Right. When a choice is made, it is retained upon re-editing the image in all browsers.
It should be noted that the "default" setting, if not also commented out, is not observed in this case. It is as if the system observes the default as defined by default (<not set>) if it is an item available as a selection regardless of the override in the dialogDefinition function. If the default is also commented out, however, everything works perfectly: the three default selections are all available, the default is <not set>, and any selection is remembered over the course of the editing session.