Opened 17 years ago
Closed 17 years ago
#2816 closed Bug (duplicate)
[IE] Refactor selection save/restore logic to work with focus state
| Reported by: | Garry Yao | Owned by: | Martin Kou | 
|---|---|---|---|
| Priority: | Normal | Milestone: | CKEditor 3.0 | 
| Component: | General | Version: | SVN (FCKeditor) - Retired | 
| Keywords: | IE Review- | Cc: | 
Description (last modified by )
Restore selection doesn't work for blued editor document. since editor is initially blured, direct dialog open will suffer from it.
Procedures
- Open replacebyclass.html in IE6.
 - Triple click to select the "CKEditor Sample" title in the page.
 - Open any dialog - link, image, table, etc.
 - You get a JavaScript error if the dialog tries to restore the selection.
 - Close the dialog by clicking cancel.
 - You get another JavaScript error.
 
Attachments (4)
Change History (12)
Changed 17 years ago by
| Attachment: | 2816.patch added | 
|---|
comment:1 Changed 17 years ago by
| Description: | modified (diff) | 
|---|---|
| Keywords: | HasPatch added | 
Changed 17 years ago by
| Attachment: | 2816_2.patch added | 
|---|
comment:3 Changed 17 years ago by
| Keywords: | Review? added; HasPatch removed | 
|---|
Proposed patch for properly restore selection for all commands.
comment:4 Changed 17 years ago by
| Description: | modified (diff) | 
|---|---|
| Summary: | [IE] Failed to restore collapsed selection from editor blured → [IE] Failed to restore selection on dialog open when editor blured | 
comment:5 Changed 17 years ago by
| Keywords: | Review- added; Review? removed | 
|---|---|
| Summary: | [IE] Failed to restore selection on dialog open when editor blured → [IE] Refactor selection save/restore logic to work with focus state | 
The last patch delegate all the save/restore logic only when dialog show/hide which is wrong, certain plugins still require manual save/restore API. A new patch would be provided with the following problem addressed:
- Automatically save editor selection(selected ranges) when document blurred;
 - Preserve manually save/restore API for flexibility in dialog commands;
 - Mimic multiple selection with the same highlight style used in find/replace marking;
 
comment:6 Changed 17 years ago by
| Owner: | set to Martin Kou | 
|---|
As talked on Skype, Martin will take over this patch.
comment:7 Changed 17 years ago by
| Status: | new → assigned | 
|---|
Garry has explained to me the changes and rationales behind his proposals, and asked me to take over the ticket due to the complexities involved.
comment:8 Changed 17 years ago by
| Resolution: | → duplicate | 
|---|---|
| Status: | assigned → closed | 
It's going to be fixed by #3001.

It's a quick patch just make no error thrown, pending for more confirmation.