r97088 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r97087‎ | r97088 | r97089 >
Date:19:22, 14 September 2011
Author:foxtrott
Status:deferred
Tags:
Comment:
bugfix (popup does not scroll in latest FF)
Modified paths:
  • /trunk/extensions/SemanticForms/libs/SF_popupform.js (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticForms/libs/SF_popupform.js
@@ -202,7 +202,7 @@
203203 var iframe = jQuery( event.target );
204204 var iframecontents = iframe.contents();
205205
206 - if ( brokenChrome ) container[0].style.visibility = "hidden";
 206+ if ( brokenBrowser ) container[0].style.visibility = "hidden";
207207 else container[0].style.opacity = 0;
208208
209209 container.show();
@@ -230,19 +230,16 @@
231231 minWidth: "0px",
232232 minHeight:"0px",
233233 overflow: "visible",
234 - position: "absolute",
 234+ position: "relative",
235235 top: "0",
236236 left: "0",
237237 border: "none"
238238 } )
239 - .parents().css( {
 239+ .parents('body').css( {
240240 margin: 0,
241241 padding: 0,
242 - width: "auto",
243 - height: "auto",
244242 minWidth: "0px",
245243 minHeight:"0px",
246 - overflow: "visible",
247244 background: "transparent"
248245 })
249246 .andSelf().siblings();
@@ -504,18 +501,20 @@
505502
506503 // find the dimensions of the document
507504
508 - var html = content.closest('html');
 505+ var body = content.closest('body');
 506+ var html = body.parent();
509507
510508 var scrollTgt = html;
511509
512510 if ( jQuery.browser.webkit || jQuery.browser.safari ) {
513 - scrollTgt = content.closest('body');
 511+ scrollTgt = body;
514512 }
515513
516514 var scrollTop = scrollTgt.scrollTop()
517515 var scrollLeft = scrollTgt.scrollLeft();
518516
519517 content
 518+ .css('position', 'absolute')
520519 .width( 'auto' )
521520 .height( 'auto' );
522521
@@ -534,6 +533,7 @@
535534 .height( '100%' );
536535
537536 content
 537+ .css('position', 'relative')
538538 .width( oldContW )
539539 .height( oldContH );
540540
@@ -696,9 +696,15 @@
697697 }
698698
699699 scrollTgt
 700+ .css('overflow', 'auto')
700701 .scrollTop(Math.min(scrollTop, docpH - frameH))
701702 .scrollLeft(scrollLeft);
702703
 704+ if ( jQuery.browser.mozilla ) {
 705+ body
 706+ .css('overflow', 'auto')
 707+ }
 708+
703709 return true;
704710 }
705711

Follow-up revisions

RevisionCommit summaryAuthorDate
r97205followup r97088: some more css tinkering to get scrolling working, fix for Ca...foxtrott21:05, 15 September 2011