#1033 closed Bug (fixed)
Unable to apply formatting to selection
Reported by: | Jon Håvard Gundersen | Owned by: | Martin Kou |
---|---|---|---|
Priority: | Must have (possibly next milestone) | Milestone: | FCKeditor 2.5 Beta |
Component: | General | Version: | SVN (FCKeditor) - Retired |
Keywords: | Confirmed IE | Cc: |
Description
Whenever I have selected a text and tries to apply a formatting (bold/italic/font etc) the selection is collapsed and the formatting is not applied to the selected text.
Verfied with IE7 in nightly build.
Change History (12)
comment:1 Changed 18 years ago by
comment:2 Changed 18 years ago by
Milestone: | → FCKeditor 2.5 |
---|---|
Owner: | set to Martin Kou |
Summary: | Unable to formatting to selection → Unable to apply formatting to selection |
Version: | → SVN |
I have the impression that the selection is being lost when saving the undo snapshot, resulting in a collapsed selection.
comment:3 Changed 18 years ago by
Keywords: | Confirmed IE added |
---|
comment:4 Changed 18 years ago by
comment:5 Changed 18 years ago by
comment:6 Changed 18 years ago by
Confirmed. I had the same findings here. The buggy point is FCK.Focus() as it make changes to the selection.
Most probably, the code added with [608] should move outside the Focus() function, to the point where the StartupFocus is executed.
comment:7 Changed 18 years ago by
Yes, it seems to working ok, both correct position after startup and no more collapsing selections if
var range = FCK.EditorDocument.selection.createRange() ; range.moveEnd( "character", 1 ) ; range.select() ; range.collapse( true ) ; range.select() ;
is moved to FCK.SetStaus
comment:8 Changed 18 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
It works wonderfully, thanks a lot.
I've committed the suggested fix as [620].
comment:9 Changed 18 years ago by
Resolution: | fixed |
---|---|
Status: | closed → reopened |
Oh, no, it's not fixed yet. There's still one more problem in IE:
- Open sample01.html.
- Copy some text from notepad or whatever source you like.
- Press the "Source" button twice.
- The cursor should be inside the editing area.
- Press Ctrl-V.
- Nothing is pasted.
- Click on the editing area.
- Paste operation successful.
So the bug from #141 is back with this fix.
comment:11 Changed 18 years ago by
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
Fixed with [621].
I've moved the kludge code into FCKEditingArea.prototype.MakeEditable(), and now it works fine for all test cases that I have.
Sorry about the missing word in the heading, should be: Unable to apply formatting to selection.
Also I noticed that if you have no selection and the cursor is inside a word the current word is formatted.