mirror of
https://github.com/philomena-dev/philomena.git
synced 2024-11-23 20:18:00 +01:00
allow < in tag input (fixes philomena-dev/philomena#35
This commit is contained in:
parent
4a61a0d213
commit
60b2c01a71
1 changed files with 2 additions and 2 deletions
|
@ -64,7 +64,7 @@ function setupTagsInput(tagBlock) {
|
|||
}
|
||||
|
||||
function handleKeyEvent(event) {
|
||||
const { keyCode, ctrlKey } = event;
|
||||
const { keyCode, ctrlKey, shiftKey } = event;
|
||||
|
||||
// allow form submission with ctrl+enter if no text was typed
|
||||
if (keyCode === 13 && ctrlKey && inputField.value === '') {
|
||||
|
@ -80,7 +80,7 @@ function setupTagsInput(tagBlock) {
|
|||
}
|
||||
|
||||
// enter or comma
|
||||
if (keyCode === 13 || keyCode === 188) {
|
||||
if (keyCode === 13 || (keyCode === 188 && !shiftKey)) {
|
||||
event.preventDefault();
|
||||
inputField.value.split(',').forEach(t => insertTag(t));
|
||||
inputField.value = '';
|
||||
|
|
Loading…
Reference in a new issue