r82530 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r82529‎ | r82530 | r82531 >
Date:19:27, 20 February 2011
Author:catrope
Status:ok
Tags:
Comment:
(bug 27355) Guard against context being null, this happens when wikiEditor disables itself in unsupported browsers and was causing a JS error
Modified paths:
  • /trunk/phase3/resources/jquery/jquery.textSelection.js (modified) (history)

Diff [purge]

Index: trunk/phase3/resources/jquery/jquery.textSelection.js
@@ -386,7 +386,7 @@
387387 break;
388388 }
389389 var context = $(this).data( 'wikiEditor-context' );
390 - var hasIframe = context !== undefined && context.$iframe !== undefined;
 390+ var hasIframe = typeof context !== 'undefined' && context && typeof context.$iframe !== 'undefined';
391391
392392 // IE selection restore voodoo
393393 var needSave = false;

Follow-up revisions

RevisionCommit summaryAuthorDate
r825331.17wmf1: MFT r78893, r78897, r78909, r82404, r82408, r82409, r82453, r82456,...catrope20:13, 20 February 2011
r85354MFT r82518, r82530, r82538, r82547, r82550, r82565, r82572, r82608, r82696, r...demon18:25, 4 April 2011

Status & tagging log