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

Why absolute positioning still not working in Firefox?

5 Answers 202 Views
Editor
This is a migrated thread and some comments may be shown as answers.
abdu bukres
Top achievements
Rank 1
abdu bukres asked on 09 Sep 2009, 07:57 AM

I posted about this over a year ago. http://www.telerik.com/community/forums/aspnet-ajax/editor/absolute-positioning-not-working-in-firefox.aspx. Why is this functionality still missing? If you say Firefox can't do it, then why a product like Cute Editor can do it?
They have been doing it for years. Check out their demo. http://cutesoft.net/example/general.aspx.

Also the fact that the absolute position icon showing for Firefox users but doing nothing will confuse them.

5 Answers, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 11 Sep 2009, 12:00 PM
Hi Abdu,

The absolute positioning works fine in RadEditor in Firefox. Please, see the attached video for more information.

Greetings,
Rumen
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
abdu bukres
Top achievements
Rank 1
answered on 13 Sep 2009, 05:52 AM
I saw the video and it seems it works thanks.

However I was trying the First Look from here: http://demos.telerik.com/aspnet-ajax/editor/examples/default/defaultcs.aspx and when I click on th eimage and then click on the 'Set Absolute Position' icon, and try to move the image, I don't see the grip to move the image.
I tried several times but the images only moves from some location to another but it does not move pixel by pixel.

Does the absolute positioning work in a specific way under Firefox?
0
Rumen
Telerik team
answered on 16 Sep 2009, 02:36 PM
Hello Abdu,

The Set Absolute Position button uses the AbsolutePosition command of the execCommand method of Internet Explorer. Firefox does not offer such command and for that reason this button works only inside Internet Explorer.

You can implement the requested functionality in Firefox using the following code as a base:

<script type="text/javascript">  
function OnClientCommandExecuted(editor, args)  
{  
   if ("AbsolutePosition" == args.get_commandName())  
   {  
       if ($telerik.isFirefox) 
       { 
        var elem = editor.getSelectedElement();  
        elem.style.position = "absolute";  
        args.set_cancel(true); 
       } 
   }  
}  
</script>  
<telerik:radeditor runat="server" ID="RadEditor1"  
    OnClientCommandExecuted="OnClientCommandExecuted">  
    <Content>  
                <P>sample text <img src="http://demos.telerik.com/aspnet-ajax/Common/ProductInfo/Controls_logo.gif" /> text text text</P> 
   </Content>  
</telerik:radeditor> 



Greetings,
Rumen
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
abdu bukres
Top achievements
Rank 1
answered on 18 Sep 2009, 04:29 PM
So you had the Javascript implemented in the video? Otherwise how did you get it working?
0
Rumen
Telerik team
answered on 23 Sep 2009, 02:04 PM
Hello abdu bukres,

The absolute positioning is a feature of the rich text editing engine of the browser. All you need to do is to put style="position:absolute" in the IMG tag and this will enable the image positioning handler. Please, note that this feature is only supported by IE and Firefox.

In the demo, I just switched to HTML mode and manuall added style="position:absolute" to the IMG tag.

Kind regards,
Rumen
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
Editor
Asked by
abdu bukres
Top achievements
Rank 1
Answers by
Rumen
Telerik team
abdu bukres
Top achievements
Rank 1
Share this question
or