r87583 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r87582‎ | r87583 | r87584 >
Date:21:28, 6 May 2011
Author:foxtrott
Status:deferred
Tags:
Comment:
fix bug where a textarea in a popup form became unresponsive in firefox 4
Modified paths:
  • /trunk/extensions/SemanticForms/includes/SF_FormPrinter.php (modified) (history)
  • /trunk/extensions/SemanticForms/libs/SF_popupform.js (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticForms/includes/SF_FormPrinter.php
@@ -253,7 +253,7 @@
254254 * only a page formula exists).
255255 */
256256 function formHTML( $form_def, $form_submitted, $source_is_page, $form_id = null, $existing_page_content = null, $page_name = null, $page_name_formula = null, $is_query = false, $embedded = false ) {
257 - global $wgRequest, $wgUser, $wgParser;
 257+ global $wgRequest, $wgUser;
258258 global $sfgTabIndex; // used to represent the current tab index in the form
259259 global $sfgFieldNum; // used for setting various HTML IDs
260260
Index: trunk/extensions/SemanticForms/libs/SF_popupform.js
@@ -603,8 +603,11 @@
604604
605605 if ( frameW != oldFrameW || frameH != oldFrameH ) {
606606
607 - iframe[0].style.overflow="hidden";
608 - html[0].style.overflow="hidden";
 607+ if ( jQuery.browser.safari ) {
 608+ html[0].style.overflow="hidden";
 609+ } else {
 610+ iframe[0].style.overflow="hidden";
 611+ }
609612
610613 if ( animate ) {
611614
@@ -621,12 +624,12 @@
622625 duration: 500,
623626 complete: function() {
624627
625 - if ( jQuery.browser.msie ) {
 628+ if ( jQuery.browser.safari ) {
 629+ html[0].style.overflow="visible";
 630+ } else if ( jQuery.browser.msie ) {
626631 iframe[0].style.overflow="auto";
627 - html[0].style.overflow="auto";
628632 } else {
629633 iframe[0].style.overflow="visible";
630 - html[0].style.overflow="visible";
631634 }
632635
633636 if ( jQuery.browser.mozilla ) {
@@ -653,13 +656,15 @@
654657 }
655658
656659 setTimeout(function(){
657 - if ( jQuery.browser.msie ) {
658 - iframe[0].style.overflow="auto";
659 - html[0].style.overflow="auto";
660 - } else {
661 - iframe[0].style.overflow="visible";
662 - html[0].style.overflow="visible";
663 - }
 660+
 661+ if ( jQuery.browser.safari ) {
 662+ html[0].style.overflow="visible";
 663+ } else if ( jQuery.browser.msie ) {
 664+ iframe[0].style.overflow="auto";
 665+ } else {
 666+ iframe[0].style.overflow="visible";
 667+ }
 668+
664669 }, 100);
665670
666671 if ( jQuery.browser.mozilla ) {
@@ -681,9 +686,9 @@
682687 if ( jQuery.browser.safari ) { // Google chrome needs a kick
683688
684689 // turn scrollbars off and on again to really only show them when needed
685 - html[0].style.overflow="hidden";
 690+ html[0].style.overflow="hidden";
686691
687 - setTimeout(function(){
 692+ setTimeout(function(){
688693 html[0].style.overflow="visible";
689694 }, 1);
690695 }