Merge pull request #35752 from leonace924/fix/issue-35741

fix: wrong tag added after enter
This commit is contained in:
Ejaaz Khan 2026-01-08 01:00:20 +05:30 committed by GitHub
commit aaf46f0563
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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: {