Opened 10 years ago
Closed 10 years ago
#11649 closed defect (fixed)
Selecting linefeed at start of text in Editor causes styling to not be applied - IE issue
Reported by: | Katie Vance | Owned by: | Jared Jurkiewicz |
---|---|---|---|
Priority: | high | Milestone: | 1.6 |
Component: | Editor | Version: | 1.5 |
Keywords: | Cc: | Katie Vance | |
Blocked By: | Blocking: |
Description
From a coworker:
If a linefeed is selected at the start of text in the editor in IE, styling can be applied correctly. However if you try to remove that styling while the text is still highlighted, the styling is not removed. The following steps can be used to reproduce this:
- Input several lines of text into the Editor for example like below.
a b c
- Select characters beginning with a linefeed. In this case, select from the linefeed character just after the character
'a' to the character 'b'.
- Add a style to the text e.g. Bold, to change the style of selected characters.
The bold styling will be applied.
- Select the same style button again (in this case bold) to restore the text to it's original format.
Problem: The text remains in bold - the styling is not restored.
This only occurs in IE and only occurs when the linefeed is selected at the start of the highlighted text.
Attachments (2)
Change History (8)
Changed 10 years ago by
Attachment: | richText.patch added |
---|
comment:1 Changed 10 years ago by
Component: | General → Editor |
---|
Changed 10 years ago by
Attachment: | RichText_better.patch added |
---|
Updated patch to over-ride the commands using the RickText? over-ride pattern
comment:5 Changed 10 years ago by
I updated your patch, it had a few issues.
1.) Your functions didn't have comments (summary, params, tags (protected, private, etc).
2.) You had places where you went against dojo style guidelines:
if(foo) { -> if(foo){ No spaces after )
3.) You didn't use the over-ride pattern for commands. The execCommand function itself should not over-ride specific commands, there is a pattern for doing it (_<command>Impl). That way it can easily customize any exec command by mixing in a function of that name, or providing a subclass that included it. (It also allows plugins to attach over-rides). So I moved your if command check into a series of command over-ride functions and returned execCommand to being a generic call.
comment:6 Changed 10 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
patch to remove empty nodes from the node selection before invoking native browser commands