r81652 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r81651‎ | r81652 | r81653 >
Date:21:59, 7 February 2011
Author:catrope
Status:ok
Tags:
Comment:
WikiEditor: Fix usage of $.client
Modified paths:
  • /trunk/extensions/WikiEditor/modules/jquery.wikiEditor.iframe.js (modified) (history)
  • /trunk/extensions/WikiEditor/modules/jquery.wikiEditor.js (modified) (history)

Diff [purge]

Index: trunk/extensions/WikiEditor/modules/jquery.wikiEditor.js
@@ -488,7 +488,7 @@
489489 * Save scrollTop and cursor position for IE
490490 */
491491 'saveCursorAndScrollTop': function() {
492 - if ( $.client.name === 'msie' ) {
 492+ if ( $.client.profile().name === 'msie' ) {
493493 var IHateIE = {
494494 'scrollTop' : context.$textarea.scrollTop(),
495495 'pos': context.$textarea.textSelection( 'getCaretPosition', { startAndEnd: true } )
@@ -500,7 +500,7 @@
501501 * Restore scrollTo and cursor position for IE
502502 */
503503 'restoreCursorAndScrollTop': function() {
504 - if ( $.client.name === 'msie' ) {
 504+ if ( $.client.profile().name === 'msie' ) {
505505 var IHateIE = context.$textarea.data( 'IHateIE' );
506506 if ( IHateIE ) {
507507 context.$textarea.scrollTop( IHateIE.scrollTop );
@@ -513,7 +513,7 @@
514514 * Save text selection for IE
515515 */
516516 'saveSelection': function() {
517 - if ( $.client.name === 'msie' ) {
 517+ if ( $.client.profile().name === 'msie' ) {
518518 context.$textarea.focus();
519519 context.savedSelection = document.selection.createRange();
520520 }
@@ -522,7 +522,7 @@
523523 * Restore text selection for IE
524524 */
525525 'restoreSelection': function() {
526 - if ( $.client.name === 'msie' && context.savedSelection !== null ) {
 526+ if ( $.client.profile().name === 'msie' && context.savedSelection !== null ) {
527527 context.$textarea.focus();
528528 context.savedSelection.select();
529529 context.savedSelection = null;
Index: trunk/extensions/WikiEditor/modules/jquery.wikiEditor.iframe.js
@@ -551,13 +551,13 @@
552552 return;
553553 },
554554 'saveSelection': function() {
555 - if ( $.client.name === 'msie' ) {
 555+ if ( $.client.profile().name === 'msie' ) {
556556 context.$iframe[0].contentWindow.focus();
557557 context.savedSelection = context.$iframe[0].contentWindow.document.selection.createRange();
558558 }
559559 },
560560 'restoreSelection': function() {
561 - if ( $.client.name === 'msie' && context.savedSelection !== null ) {
 561+ if ( $.client.profile().name === 'msie' && context.savedSelection !== null ) {
562562 context.$iframe[0].contentWindow.focus();
563563 context.savedSelection.select();
564564 context.savedSelection = null;

Follow-up revisions

RevisionCommit summaryAuthorDate
r816541.17: MFT r78372, r79324, r80841, r81430, r81488, r81496, r81554, r81561, r81...catrope22:28, 7 February 2011

Status & tagging log