Avoid selecting profile suggestion if Ctrl+Enter is pressed

If I was typing a queet and ended with a mention (@theru) it listed
several nicknames matching '%theru%', such as 'anoTHERUser'. When I
send the queet with the short command Ctrl+Enter it chose @anotheruser
and my friend theru was ever so sad not to receive the notification :(
This commit is contained in:
Mikael Nordfeldth 2016-01-13 21:55:20 +01:00
parent 62817126a4
commit 6b778feb31

View File

@ -2776,7 +2776,7 @@ $('body').on('keydown', '.queet-box-syntax', function(e) {
if($(this).siblings('.mentions-suggestions').children('div').length > 0) { if($(this).siblings('.mentions-suggestions').children('div').length > 0) {
// enter or tab // enter or tab
if (e.keyCode == '13' || e.keyCode == '9') { if (!e.ctrlKey && (e.keyCode == '13' || e.keyCode == '9')) {
e.preventDefault(); e.preventDefault();
useSelectedMention($(this)); useSelectedMention($(this));
} }