fix: история автозаполнения браузера перекрывала выпадашку LOT

Поля с собственной выпадашкой в конфигураторе не имели autocomplete="off",
и браузер рисовал поверх неё нативный список ранее введённых значений.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Mikhail ChusavitinandClaude Opus 5.5 committed 2026-10-02 16:33:54 +03:00
1 parent ae26db6624
commit 81f5800e5c
1 file changed
+7 -7
+7 -7
View File
@@ -1526,7 +1526,7 @@ function renderSingleSelectTab(categories) {
value="${selectedItem?.lot_name || ''}"
placeholder="Введите артикул..."
class="w-full px-2 py-1 border rounded text-sm font-mono"
onfocus="showAutocomplete('${cat}', this)"
autocomplete="off" onfocus="showAutocomplete('${cat}', this)"
oninput="filterAutocomplete('${cat}', this.value)"
onkeydown="handleAutocompleteKey(event, '${cat}')">
</div>
@@ -1592,7 +1592,7 @@ function renderMultiSelectTab(components) {
<input type="text"
value="${escapeHtml(item.lot_name)}"
class="w-full px-2 py-1 border rounded text-sm font-mono"
onfocus="showAutocompleteEditItem('${item.lot_name}', this)"
autocomplete="off" onfocus="showAutocompleteEditItem('${item.lot_name}', this)"
oninput="filterAutocompleteEditItem(this.value)"
onkeydown="handleAutocompleteKeyEditItem(event)">
</div>
@@ -1625,7 +1625,7 @@ function renderMultiSelectTab(components) {
id="input-new-item"
placeholder="Добавить компонент..."
class="w-full px-2 py-1 border rounded text-sm"
onfocus="showAutocompleteMulti(this)"
autocomplete="off" onfocus="showAutocompleteMulti(this)"
oninput="filterAutocompleteMulti(this.value)"
onkeydown="handleAutocompleteKeyMulti(event)">
</div>
@@ -1704,7 +1704,7 @@ function renderMultiSelectTabWithSections(sections) {
value="${escapeHtml(item.lot_name)}"
data-categories="${categoriesStr}"
class="w-full px-2 py-1 border rounded text-sm font-mono"
onfocus="showAutocompleteEditItem('${item.lot_name}', this)"
autocomplete="off" onfocus="showAutocompleteEditItem('${item.lot_name}', this)"
oninput="filterAutocompleteEditItem(this.value)"
onkeydown="handleAutocompleteKeyEditItem(event)">
</div>
@@ -1738,7 +1738,7 @@ function renderMultiSelectTabWithSections(sections) {
data-categories="${categoriesStr}"
placeholder="Добавить ${section.title.toLowerCase()}..."
class="w-full px-2 py-1 border rounded text-sm"
onfocus="showAutocompleteSection('${sectionId}', this)"
autocomplete="off" onfocus="showAutocompleteSection('${sectionId}', this)"
oninput="filterAutocompleteSection('${sectionId}', this.value, this)"
onkeydown="handleAutocompleteKeySection(event, '${sectionId}')">
</div>
@@ -3744,7 +3744,7 @@ function _bomRawLotCell(rowIdx) {
return `<div class="autocomplete-wrapper relative"><input type="text" placeholder="Введите артикул..."
value="${escapeHtml(val)}"
class="w-full min-w-28 px-2 py-1 border rounded text-xs font-mono"
onfocus="showAutocompleteBOM(${rowIdx}, this)"
autocomplete="off" onfocus="showAutocompleteBOM(${rowIdx}, this)"
oninput="filterAutocompleteBOM(${rowIdx}, this.value); setBOMManualLotDraft(${rowIdx}, this.value, this)"
onkeydown="handleAutocompleteKeyBOM(event, ${rowIdx})"></div>
${renderBOMLotAllocationsEditor(rowIdx)}`;
@@ -4144,7 +4144,7 @@ function _renderBOMParsedTable() {
lotCell = `<div class="autocomplete-wrapper relative"><input type="text" placeholder="Введите артикул..."
value="${escapeHtml(row.manual_lot || '')}"
class="w-full px-2 py-1 border rounded text-sm font-mono focus:ring-1 focus:ring-blue-400"
onfocus="showAutocompleteBOM(${row.source_row_index}, this)"
autocomplete="off" onfocus="showAutocompleteBOM(${row.source_row_index}, this)"
oninput="filterAutocompleteBOM(${row.source_row_index}, this.value); bomRows.find(r=>r.source_row_index===${row.source_row_index}).manual_lot=this.value;"
onkeydown="handleAutocompleteKeyBOM(event, ${row.source_row_index})"></div>${renderBOMLotAllocationsEditor(idx)}`;
} else {