From 6cc435d68a0f6ab3f32c56fbb6bb445d9b9c17b1 Mon Sep 17 00:00:00 2001 From: Roan Kattouw Date: Sat, 19 Feb 2011 19:21:52 +0000 Subject: [PATCH] Revert r74387: it may not fix the IE8 jumping bug in all cases, but it definitely fixes it in most cases. Reverting a partial fix for not being perfect, then never coming up with a full fix is not acceptable. --- includes/EditPage.php | 2 ++ skins/common/IE80Fixes.css | 15 +++++++++++++++ 2 files changed, 17 insertions(+) create mode 100644 skins/common/IE80Fixes.css diff --git a/includes/EditPage.php b/includes/EditPage.php index e8bfd95b25..a79e272322 100644 --- a/includes/EditPage.php +++ b/includes/EditPage.php @@ -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 index 0000000000..b6360f60eb --- /dev/null +++ b/skins/common/IE80Fixes.css @@ -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%; +} -- 2.20.1