Revert r74387: it may not fix the IE8 jumping bug in all cases, but it definitely...
authorRoan Kattouw <catrope@users.mediawiki.org>
Sat, 19 Feb 2011 19:21:52 +0000 (19:21 +0000)
committerRoan Kattouw <catrope@users.mediawiki.org>
Sat, 19 Feb 2011 19:21:52 +0000 (19:21 +0000)
includes/EditPage.php
skins/common/IE80Fixes.css [new file with mode: 0644]

index e8bfd95..a79e272 100644 (file)
@@ -371,6 +371,8 @@ class EditPage {
                if ( $wgUser->getOption( 'uselivepreview', false ) ) {
                        $wgOut->addModules( 'mediawiki.legacy.preview' );
                }
+               // Bug #19334: textarea jumps when editing articles in IE8
+               $wgOut->addStyle( 'common/IE80Fixes.css', 'screen', 'IE 8' );
 
                $permErrors = $this->getEditPermissionErrors();
                if ( $permErrors ) {
diff --git a/skins/common/IE80Fixes.css b/skins/common/IE80Fixes.css
new file mode 100644 (file)
index 0000000..b6360f6
--- /dev/null
@@ -0,0 +1,15 @@
+/**
+ * Fixes textarea scrolling bug (bug #19334).  The bug only occurs when a
+ * percentage width is given, so instead of width: 100%, use min-width: 100%;
+ * max-width: 100%.  We also need to give a fixed width for the actual width
+ * property for the hack to work, although the actual value (500px here) ends
+ * up being ignored; min/max-width take precedence.
+ *
+ * More info: http://grantovich.net/posts/2009/06/that-weird-ie8-textarea-bug/
+ */
+#wpTextbox1 {
+       height: 390px;
+       width: 500px;
+       min-width: 100%;
+       max-width: 100%;
+}