jenkins-bot has submitted this change and it was merged.

Change subject: Use moveCursorToEnd from OOjs UI
......................................................................


Use moveCursorToEnd from OOjs UI

Depends on Ia63e6c6a0 in OOjs UI.

Change-Id: If6eabb85d30b52883dd4a5743f9907b9ecfa3887
---
M modules/flow/ui/widgets/editor/editors/mw.flow.ui.WikitextEditorWidget.js
1 file changed, 1 insertion(+), 11 deletions(-)

Approvals:
  Mooeypoo: Looks good to me, approved
  jenkins-bot: Verified



diff --git 
a/modules/flow/ui/widgets/editor/editors/mw.flow.ui.WikitextEditorWidget.js 
b/modules/flow/ui/widgets/editor/editors/mw.flow.ui.WikitextEditorWidget.js
index d75c6cf..e785abf 100644
--- a/modules/flow/ui/widgets/editor/editors/mw.flow.ui.WikitextEditorWidget.js
+++ b/modules/flow/ui/widgets/editor/editors/mw.flow.ui.WikitextEditorWidget.js
@@ -121,17 +121,7 @@
         * @inheritdoc
         */
        mw.flow.ui.WikitextEditorWidget.prototype.moveCursorToEnd = function () 
{
-               // TODO: After Ia63e6c6a0 is merged and released in OOjs UI, we 
can do:
-               // this.input.moveCursorToEnd();
-               var textRange,
-                       element = this.input.$input[0];
-               if ( element.selectionStart !== undefined ) {
-                       element.selectionStart = element.selectionEnd = 
element.value.length;
-               } else if ( element.createTextRange ) {
-                       textRange = element.createTextRange();
-                       textRange.collapse( false );
-                       textRange.select();
-               }
+               this.input.moveCursorToEnd();
        };
 
        /**

-- 
To view, visit https://gerrit.wikimedia.org/r/232883
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: If6eabb85d30b52883dd4a5743f9907b9ecfa3887
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: master
Gerrit-Owner: Catrope <[email protected]>
Gerrit-Reviewer: Mattflaschen <[email protected]>
Gerrit-Reviewer: Mooeypoo <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to