Opened 17 years ago
Closed 17 years ago
#1715 closed Bug (fixed)
ShowDropDialog must be considered only when ForcePasteAsPlainText = true
Reported by: | Frederico Caldeira Knabben | Owned by: | Frederico Caldeira Knabben |
---|---|---|---|
Priority: | Normal | Milestone: | FCKeditor 2.6 |
Component: | General | Version: | FCKeditor 2.5 |
Keywords: | Confirmed Review+ | Cc: |
Description
For #338, we have introduced a new feature which guarantees that dropped text will respect the ForcePasteAsPlainText setting, not allowing dropping rich contents in that case.
The solution used is trying to transform the dropped data to simple text on the fly (IE only), showing a dialog to which dropping is possible, or even disable dropping all the way. To disable it, the ShowDropDialog can be set to "false".
But, the current implementation makes it impossible to have the normal dropping behavior because the editor always looks for the ShowDropDialog, even if ForcePasteAsPlainText = false. It should not happen instead.
Attachments (2)
Change History (9)
comment:1 Changed 17 years ago by
comment:2 Changed 17 years ago by
Status: | new → assigned |
---|
comment:3 Changed 17 years ago by
Keywords: | Review? added |
---|
comment:4 Changed 17 years ago by
Wouldn't it be better if the gecko code followed the same logic than the IE and instead of using return it cancels the event only if ForcePasteAsPlainText is enabled?
if ( FCKConfig.ForcePasteAsPlainText ) { if ( evt.dataTransfer ) { var text = evt.dataTransfer.getData( 'Text' ) ; text = FCKTools.HTMLEncode( text ) ; text = FCKTools.ProcessLineBreaks( window, FCKConfig, text ) ; FCK.InsertHtml( text ) ; } else if ( FCKConfig.ShowDropDialog ) FCK.PasteAsPlainText() ; evt.preventDefault() ; evt.stopPropagation() ; } }
Changed 17 years ago by
Attachment: | 1715_2.patch added |
---|
comment:5 Changed 17 years ago by
You comment is correct Alfonso. Feel free to mark "Review-" in those cases. If I think I did it well, I'll explain it and call "Review?" again.
That "else return" call was useless. There was also a small fix for IE (moving the evt declaration inside the if).
The new patch fixes both things.
comment:6 Changed 17 years ago by
Keywords: | Review+ added; Review? removed |
---|
comment:7 Changed 17 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Fixed with [1449]. Click here for more info about our SVN system.
Probably this is related to a misinterpretation of my comments in #338, like:
My fault. As that ticket is related to ForcePasteAsPlainText, I thought it was clear that I was talking about it. I'll try to be clearer from now on.