Author: mgrigorov Date: Sun Jul 18 09:15:32 2010 New Revision: 965182 URL: http://svn.apache.org/viewvc?rev=965182&view=rev Log: Port from wicket-1.4.x
r808930 Author: jcompagner Date: Fri Aug 28 15:56:30 2009 UTC (10 months, 2 weeks ago) Changed paths: 1 Log Message: test if left/top cant be smaller then 0 Modified: wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/modal/res/modal.js Modified: wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/modal/res/modal.js URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/modal/res/modal.js?rev=965182&r1=965181&r2=965182&view=diff ============================================================================== --- wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/modal/res/modal.js (original) +++ wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/modal/res/modal.js Sun Jul 18 09:15:32 2010 @@ -495,6 +495,8 @@ Wicket.Window.prototype = { var left = (width / 2) - (modalWidth / 2) + scLeft; var top = (height / 2) - (modalHeight / 2) + scTop; + if (left < 0) left = 0; + if (top < 0) top = 0; this.window.style.left = left + "px"; this.window.style.top = top + "px";