Merge "Fire window-open-from-tool event for username completion from toolbar"

This commit is contained in:
jenkins-bot 2020-06-25 20:29:18 +00:00 committed by Gerrit Code Review
commit dc07a5c2b1

View file

@ -48,6 +48,13 @@ MWUsernameCompletionAction.static.methods.push( 'insertAndOpen' );
/* Methods */ /* Methods */
MWUsernameCompletionAction.prototype.insertAndOpen = function () { MWUsernameCompletionAction.prototype.insertAndOpen = function () {
// This is opening a window in a slightly weird way, so the normal logging
// doesn't catch it. This assumes that the only way to get here is from
// the tool. If we add other paths, we'd need to change the logging.
ve.track(
'activity.' + this.constructor.static.name,
{ action: 'window-open-from-tool' }
);
this.surface.getModel().getFragment().insertContent( '@' ).collapseToEnd().select(); this.surface.getModel().getFragment().insertContent( '@' ).collapseToEnd().select();
return this.open(); return this.open();
}; };