In IE9 GetRectangle() is shifted by 2px

3 posts, 0 answers
  1. Alexey Ivanov
    Alexey Ivanov avatar
    45 posts
    Member since:
    Sep 2009

    Posted 01 Jun 2011 Link to this post

    Hello

    To reproduce use this page:

    test.html
    <!DOCTYPE html>
     
    <style>
    #div1
    {
        background:blue;
        position:absolute;
        top:40px; left:40px;
        width: 300px; height:299px;
    }
    </style>
     
    <div id=div1></div>


    and this code:
    var rect = Manager.Current.ActiveBrowser.Find.ById("div1").GetRectangle();
     
    Form form = null;
     
    form = new Form();               
    form.BackColor = Color.Red;
    form.FormBorderStyle = FormBorderStyle.None;
    form.Opacity = 0.7;
     
    form.Show();
    form.Location = rect.Location;
    form.Size = rect.Size;
     
     
    for(var i = 0; i < 10; i++) {               
        form.Activate();
        form.Refresh();
     
        Thread.Sleep(500);
    }
     
    form.Dispose();

    In IE8 and Firefox the created window will match the blue div exactly.
    In IE9 it will be positioned with 2px offset (to the right-bottom)

    In some scenarios it causes wrong desktop actions.
  2. Stoich
    Admin
    Stoich avatar
    1 posts

    Posted 08 Jun 2011 Link to this post

    Hello Alexey,
        thank you for your feedback.

    I've confirmed this issue and I've logged this at a bug. You can track its progress here:
    http://www.telerik.com/support/pits.aspx#/public/test-studio/6414
    500 Telerik points added to your account

    Regards,
    Stoich
    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
  3. Alexey Ivanov
    Alexey Ivanov avatar
    45 posts
    Member since:
    Sep 2009

    Posted 08 Jun 2011 Link to this post

    Thanks for the confirmation, and thanks for points!
Back to Top