Matthias Mullie has uploaded a new change for review.
https://gerrit.wikimedia.org/r/194872
Change subject: Remove some ExpandTextarea mess
......................................................................
Remove some ExpandTextarea mess
AFAICT, there's a redundant expandTextarea call, since
showForm is also called at that place, which in turn
calls expandTextarea.
And since showForm also calls initializeEditors, there's
no point in loading editor from expandTextarea.
I have a feeling there might be a reason these are here,
but I can't make sense of it. Looking at the code, these
2 lines looks completely redundant.
Change-Id: I081cf4e91411777023045af498722abe68f7bfd8
---
M modules/engine/components/common/flow-component-events.js
1 file changed, 0 insertions(+), 4 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Flow
refs/changes/72/194872/1
diff --git a/modules/engine/components/common/flow-component-events.js
b/modules/engine/components/common/flow-component-events.js
index a6ad9fd..df6a155 100644
--- a/modules/engine/components/common/flow-component-events.js
+++ b/modules/engine/components/common/flow-component-events.js
@@ -713,9 +713,6 @@
var $context = $( event.currentTarget || event.delegateTarget
|| event.target ),
component = mw.flow.getPrototypeMethod( 'component',
'getInstanceByElement' )( $context );
- // Expand this textarea
- component.emitWithReturn( 'expandTextarea', $context );
-
// Show the form (and swap it for textarea if needed)
component.emitWithReturn( 'showForm', $context.closest( 'form'
) );
}
@@ -760,7 +757,6 @@
*/
function flowEventsMixinexpandTextarea( $textarea ) {
$textarea.removeClass( 'flow-input-compressed' );
- mw.flow.editor.load( $textarea, $textarea.val(), 'wikitext' );
}
FlowComponentEventsMixin.eventHandlers.expandTextarea =
flowEventsMixinexpandTextarea;
--
To view, visit https://gerrit.wikimedia.org/r/194872
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I081cf4e91411777023045af498722abe68f7bfd8
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: master
Gerrit-Owner: Matthias Mullie <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits