WordPress.org

Forums

Anything Popup
[resolved] IE Popup Position Fix (4 posts)

  1. ConsultCorbin
    Member
    Posted 1 year ago #

    The popup position was displaying below the bottom of the window because the position is set to fixed. I removed the code that calculates and adds the offset and now it is working properly in google-chrome, firefox, and IE 7,8,9,10.

    Here is the fix:

    +++ anything-popup/anything-popup.js    2013-09-27 11:14:32.000000000 -0500
    @@ -224,30 +224,9 @@
    
        var _x = 0;
        var _y = 0;
    -   var offsetX = 0;
    -   var offsetY = 0;
    
    -   if(!window.pageYOffset)
    -   {
    -      if(!(document.documentElement.scrollTop == 0))
    -      {
    -         offsetY = document.documentElement.scrollTop;
    -         offsetX = document.documentElement.scrollLeft;
    -      }
    -      else
    -      {
    -         offsetY = document.body.scrollTop;
    -         offsetX = document.body.scrollLeft;
    -      }
    -   }
    -   else
    -   {
    -      offsetX = window.pageXOffset;
    -      offsetY = window.pageYOffset;
    -   }
    -
    -   _x = ((this.size().width-hWnd.width)/2)+offsetX;
    -   _y = ((this.size().height-hWnd.height)/2)+offsetY;
    +   _x = ((this.size().width-hWnd.width)/2);
    +   _y = ((this.size().height-hWnd.height)/2);
    
        return{x:_x,y:_y};
     }

    [Moderator Note: Please post code & markup between backticks or use the code button. Your posted code may now have been permanently damaged by the forum's parser.]

    http://wordpress.org/plugins/anything-popup/

  2. nate1994
    Member
    Posted 1 year ago #

    Thanks, this was exactly what I needed.

  3. jpite
    Member
    Posted 11 months ago #

    Thanks for that… was having similar issue in Safari 6.1.4. Is your code entered on this page? anything-popup/anything-popup.php

    And what specifically does it replace?

    Many thanks!

  4. gopiplus@hotmail.com
    Member
    Plugin Author

    Posted 10 months ago #

    Hi ConsultCorbin,

    Thank you for the information. This has been updated on plugin version 5.5

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Anything Popup
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic