Skip to content
Snippets Groups Projects
Commit 1eea9fdd authored by ubermanu's avatar ubermanu
Browse files

bugfix: allow mobile devices to open the drawer when typing "@"

parent b2c6cfb9
No related branches found
No related tags found
2 merge requests!105Allow mobile devices to open the mention drawer when typing "@",!104#227 mention on mobile devices
/**
* Allow mentions on mobile phones.
* Register a new event handler for the textarea InputEvent.
* Note: The chatroom should already have an event for it.
*/
converse.plugins.add('sib-mention-mobile', {
overrides: {
ChatRoomView: {
/**
* @param {InputEvent} ev
*/
inputChanged(ev) {
this.__super__.inputChanged.apply(this, arguments);
this.mention_auto_complete.onInput(ev);
},
},
AutoComplete: {
/**
* @param {InputEvent} ev
*/
onInput(ev) {
if (this.ac_triggers.includes(ev.data)) {
this.auto_completing = true;
}
},
},
},
});
......@@ -10,6 +10,7 @@ import './plugins/sib-chat-navigation.js';
import './plugins/sib-custom-hats.js';
import './plugins/sib-disconnected.js';
import './plugins/sib-mam-history.js';
import './plugins/sib-mention-mobile.js';
import './plugins/sib-remove-notifications.js';
import './plugins/sib-scroll-down-on-focus.js';
import './plugins/sib-subscribe-to-rai.js';
......@@ -225,6 +226,7 @@ export const SolidXMPPChat = {
'sib-custom-hats',
'sib-disconnected',
'sib-mam-history',
'sib-mention-mobile',
'sib-remove-notifications',
'sib-scroll-down-on-focus',
'sib-subscribe-to-rai',
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment