r61399 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r61398‎ | r61399 | r61400 >
Date:21:57, 22 January 2010
Author:catrope
Status:deferred
Tags:
Comment:
Partial revert of r61393: committed unrelated work in progress
Modified paths:
  • /trunk/extensions/UsabilityInitiative/js/plugins/jquery.wikiEditor.js (modified) (history)

Diff [purge]

Index: trunk/extensions/UsabilityInitiative/js/plugins/jquery.wikiEditor.js
@@ -586,29 +586,23 @@
587587 if ( typeof selector == 'undefined' ) {
588588 selector = '*';
589589 }
590 -
591 - // Start at the selection's start and traverse the DOM backwards
592 - // This is done by traversing an element's children first, then the element itself, then its parent
593590 var e;
594591 if ( context.$iframe[0].contentWindow.getSelection ) {
595592 // Firefox and Opera
596593 var selection = context.$iframe[0].contentWindow.getSelection();
597594 // On load, webkit seems to not have a valid selection
598595 if ( selection.baseNode !== null ) {
 596+ // Start at the selection's start and traverse the DOM backwards
 597+ // This is done by traversing an element's children first, then the element itself, then its parent
599598 e = selection.getRangeAt( 0 ).startContainer;
600599 } else {
601600 return $( [] );
602601 }
603602 } else if ( context.$iframe[0].contentWindow.document.selection ) {
604603 // IE
605 - // range.startContainer or similar functionality is not available in IE, so we have to
606 - // traverse the DOM to find out which element the selection starts in
607 - var range = context.$iframe[0].contentWindow.document.selection.createRange(),
608 - preRange = context.$iframe[0].contentWindow.document.body.createTextRange();
609 - preRange.setEndPoint( "EndToStart", range );
610 - // TODO finish
 604+ // TODO
 605+ return $( [] );
611606 }
612 -
613607 if ( e.nodeName != '#text' ) {
614608 // The selection is not in a textnode, but between two non-text nodes
615609 // (usually inside the <body> between two <br>s). Go to the rightmost

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r61393UsabilityInitiative: (bug 22202) Link and table dialogs insert text when pres...catrope20:55, 22 January 2010

Status & tagging log