Merge pull request #35752 from leonace924/fix/issue-35741
fix: wrong tag added after enter
This commit is contained in:
commit
aaf46f0563
1 changed files with 7 additions and 0 deletions
|
|
@ -101,6 +101,13 @@ frappe.ui.TagEditor = class TagEditor {
|
|||
});
|
||||
$input.on("enter-pressed-in-addtag", function (e) {
|
||||
var value = e.target.value;
|
||||
// If user typed something, use exactly what they typed
|
||||
// Don't override with suggestions - let user create new tags
|
||||
if (value && value.trim()) {
|
||||
$input.trigger("input-selected");
|
||||
return;
|
||||
}
|
||||
// Only fetch suggestions if input is empty
|
||||
frappe.call({
|
||||
method: "frappe.desk.doctype.tag.tag.get_tags",
|
||||
args: {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue