mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/DiscussionTools
synced 2024-11-28 10:11:45 +00:00
Merge "Fire window-open-from-tool event for username completion from toolbar"
This commit is contained in:
commit
dc07a5c2b1
|
@ -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();
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue