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

Missing content after moving RadEditor inside of Raddock (Chrome and IE9)

1 Answer 74 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Pavel
Top achievements
Rank 1
Pavel asked on 06 Dec 2011, 12:17 PM
Hello

I am playing with Editor inside RadDock. I found strange behaviour in some browsers (IE9 and Chrome - no other tested)

IE9:
After move of dock, design mode is not editable and blocked.
After move od dock in html mode, content is lost, editing blocked but switch to other mode and back will allow html editing.
Chrome:
When moving Dock in HTML mode, after placing dock into Zone, content is lost.
Also, when just clicking on the docked raddock (or doing  very short dragging), text will disappear from the editor however it is still present (checked with alert in javascript) and will usually reappear after it is moved somewhere else. 

This is not happening if the dock is not placed in zone

It is running without issues on IE8 or  IE9 in compatibility mode or IE9 if using  <meta http-equiv="X-UA-Compatible" content="IE=8" />.


Sample code : 
<div>    
        <telerik:RadDockZone ID="RadDockZone1" runat="server" Height="300px" Width="300px">
               </telerik:RadDockZone>
            <telerik:RadDock ID="RadDock1" runat="server" Width="300px" >
                <ContentTemplate>                     
                    <telerik:RadEditor ID="RadEditor1" runat="server">
                    </telerik:RadEditor>                    
                </ContentTemplate> 
            </telerik:RadDock>
</div>

SW: VS 2008, .NET 3.5, Telerik 3Q 2011

Is there any way to fix such behaviour preferably without use of <meta...

Regards

Pavel

1 Answer, 1 is accepted

Sort by
0
Accepted
Slav
Telerik team
answered on 08 Dec 2011, 04:54 PM
Hi Pavel,

This problem occurs because the RadEditor is moved inside the DOM when the dock is moved. To avoid this issue you need to call RadEditor's onParentNodeChanged() client-side method when the dock position is changed. To achieve this you need to assign a handler to the RadDock's ClientDockPositionChanged client-side event.

Also, you should set the RadEditor to Design mode until the RadDock is being dragged. This can be achieved via the dock control's client events OnClientDragStart and OnClientDragEnd and the client method set_mode of the RadEditor.

You can find attached a sample page, implementing the suggested solution.

Greetings,
Slav
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
Tags
Editor
Asked by
Pavel
Top achievements
Rank 1
Answers by
Slav
Telerik team
Share this question
or