Opened 12 years ago
Last modified 12 years ago
#10326 confirmed Bug
Maximize button removes input[name=style] from form
Reported by: | Travis Paul | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | UI : Toolbar | Version: | 3.0 |
Keywords: | Cc: |
Description
When clicking the maximize button if there is an element with the name of "style" it will be removed from the DOM.
After discovering the issue I downloaded the latest Zip from the website and modified the replacebycode.html (attached) file to confirm.
Attachments (1)
Change History (3)
Changed 12 years ago by
Attachment: | replacebycode.html added |
---|
comment:1 Changed 12 years ago by
Keywords: | maximize input name style removed |
---|---|
Status: | new → confirmed |
Version: | 4.1 → 3.0 |
WOW. I confirm this.
These lines https://github.com/ckeditor/ckeditor-dev/blob/master/plugins/maximize/plugin.js#L11-L20 are definitely incorrect, although I have no idea what they were supposed to do :|.
comment:2 Changed 12 years ago by
Ha! I got this.
Paste this into the form:
<input type="text" name="style" value="wtf" /> <input type="text" name="className" value="lol" />
And check:
document.forms[ 0 ].className // -> input document.forms[ 0 ].style // -> input
Maximize plugin is reseting styles and class names when maximising the editor and restoring them later. But to be able to read className and style from form we need to remove these inputs first.
The funny part: this code does not work at all. Elements are removed but are not restored.
It'd be cool if we could get rid of this code at all by reading class names and styles the other way.
Modified sample code.