r98658 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r98657‎ | r98658 | r98659 >
Date:07:06, 2 October 2011
Author:werdna
Status:ok (Comments)
Tags:
Comment:
Fix IE7 compatibility with MoodBar: Now appears normally, except without rounded corners.
Modified paths:
  • /trunk/extensions/MoodBar/modules/ext.moodBar/ext.moodBar.core.js (modified) (history)
  • /trunk/extensions/MoodBar/modules/ext.moodBar/ext.moodBar.init.js (modified) (history)

Diff [purge]

Index: trunk/extensions/MoodBar/modules/ext.moodBar/ext.moodBar.init.js
@@ -18,7 +18,7 @@
1919 var browserDisabled = false;
2020 var clientInfo = $.client.profile();
2121
22 - if ( clientInfo.name == 'msie' && clientInfo.versionNumber < 9 ) {
 22+ if ( clientInfo.name == 'msie' && clientInfo.versionNumber < 7 ) {
2323 browserDisabled = true;
2424 }
2525
Index: trunk/extensions/MoodBar/modules/ext.moodBar/ext.moodBar.core.js
@@ -16,7 +16,7 @@
1717 <div class="mw-moodBar-overlayContent"></div>\
1818 </div></div>',
1919 userinput: '\
20 - <div class="mw-moodBar-overlayTitle"><html:msg key="INTROTITLE" /></div>\
 20+ <div class="mw-moodBar-overlayTitle"><span><html:msg key="INTROTITLE" /></span></div>\
2121 <div class="mw-moodBar-types-container">\
2222 <div class="mw-moodBar-types"></div>\
2323 </div>\
@@ -41,7 +41,7 @@
4242 type: '\
4343 <span class="mw-moodBar-type mw-moodBar-type-$1" rel="$1">\
4444 <span class="mw-moodBar-typeTitle"><html:msg key="moodbar-type-$1-title" /></span>\
45 - </div>',
 45+ </span>',
4646 loading: '\
4747 <div class="mw-moodBar-state mw-moodBar-state-loading">\
4848 <div class="mw-moodBar-state-title"><html:msg key="moodbar-loading-title" /></div>\
@@ -240,7 +240,7 @@
241241 .find('.mw-moodBar-types')
242242 .width() + 140;
243243 var titleWidth = mb.ui.overlay
244 - .find('.mw-moodBar-overlayTitle')
 244+ .find('.mw-moodBar-overlayTitle span')
245245 .width() + 100;
246246
247247 if ( newWidth < titleWidth ) {

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r98134Progress on fixing MoodBar IE7 bug:...werdna15:10, 26 September 2011

Comments

#Comment by Krinkle (talk | contribs)   15:38, 2 October 2011

yeah, mismatching tags are fatal in IE7.

btw, curious, why the extra span tag inside mw-moodBar-overlayTitle ?

#Comment by Werdna (talk | contribs)   07:49, 3 October 2011

Because IE7 assumes the width of all block elements is the screen width, whereas inline elements it detects the width of.

Status & tagging log