This is a migrated thread and some comments may be shown as answers.

FireFox Issue: after paste from Word, can't edit text.

3 Answers 31 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Richard Buff
Top achievements
Rank 1
Richard Buff asked on 29 Oct 2010, 04:11 PM
Hi,

Here is an interesting issue that a customer brought up:

In FireFox, in a modal popup window with the editor is in DIV mode.  Copy some text from MS Word into the editor.

Close the editor in such a way to save the data (our app saves to a database).

Reopen the editor reading the data from your data store.

Hi-lite all the text (ctrl-a)  Click the Delete key.  Notice that the text does not delete.  You can't delete the text until you type a character at the end or beginning of your pasted text.  This is only a FireFox issue.  Does not happen in Safari or IE. (Haven't testing in Chrome)

Sometimes you don't have to save the pasted text, editing just gets hosed right after pasting.

This feature was introduced sometime in the last 2 versions. (We have a site running an older version of the tools.)

Here is our editor definition in the markup:

 

 

<telerik:RadEditor ID="txtItemSubject" runat="server"
EnableResize="False"

 

 

Width="590" Height="110"

 

EditModes="Design, html"

 

SpellCheckSettings-AllowAddCustom="false"

 

 

 

SpellCheckSettings-DictionaryLanguage="en-US"
SpellCheckSettings-SpellCheckProvider="TelerikProvider"

 

 

 

OnClientPasteHtml="OnClientPaste"

 

 

 

StripFormattingOnPaste="AllExceptNewLines"

 

 

 

ContentAreaMode="Div"

 

 

 

Contentfilters="MozEmStrong, EncodeScripts"

 

 

 

OnClientModeChange="OnClientModeChange"

 

 

 

OnClientLoad="OnRadEditorClientLoad">

 

 

OnClientPaste only checks the length of the text pasted - not modifications are done to the paste. 
OnRadEditorClientLoad resizes the client area so the sizing is the same between browsers - again, not modifying the text.

This is repoducable with any text from Word.  (I just opened a random word doc and copied from several different line and could repro this regardless of the line - so it's not Word doc specific.

Thanks!
Rich

3 Answers, 1 is accepted

Sort by
0
Dobromir
Telerik team
answered on 02 Nov 2010, 04:17 PM
Hi Richard,

We are aware of this problem and are working on fixing it. Unfortunately, I am unable to provide firm estimate when this problem will be solved.

For the time being you can use the following workaround:
function OnClientLoad(editor, args)
{
    if ($telerik.isFirefox)
    {
        var content = editor.get_html(true);
        if (content != "")
            editor.set_html(content);
        else
            editor.set_html("&nbsp;");
    }
 }


Regards,
Dobromir
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Richard Buff
Top achievements
Rank 1
answered on 03 Nov 2010, 07:47 PM
Hi,

Thanks for the suggestion, unfortunately, it only works on the first time through the use case.

For example,
  1. user opens the modal popup with editor for the first time after loading the page
  2. user selects all and clicks delete.  Text goes away (yay)
  3. Rather than save, the user cancels out
  4. user reloads the modal popup
  5. user selects all text and hits Delete key and notice that the text does NOT delete.

Any thoughts?  I have verified that the workaround code is rerun each time the Editor is shown.

Thanks!
Rich

 

0
Dobromir
Telerik team
answered on 04 Nov 2010, 05:45 PM
Hi Richard,

Could you please open a support ticket and provide a sample project replicating the exact scenario so we can investigate it further and try to provide a solution to the problem?

Sincerely yours,
Dobromir
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
Editor
Asked by
Richard Buff
Top achievements
Rank 1
Answers by
Dobromir
Telerik team
Richard Buff
Top achievements
Rank 1
Share this question
or