mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/DiscussionTools
synced 2024-11-24 08:23:52 +00:00
Fire window-open-from-tool event for username completion from toolbar
The automatic event from core didn't catch this, because it's not an action method called "open". Bug: T255638 Change-Id: Ifa456e850a8edb374df098e21b46bb872416ae55
This commit is contained in:
parent
a00bc8411a
commit
02fafccd23
|
@ -48,6 +48,13 @@ MWUsernameCompletionAction.static.methods.push( 'insertAndOpen' );
|
|||
/* Methods */
|
||||
|
||||
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();
|
||||
return this.open();
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue