Skip to content

fix: prevent Section Name input from losing focus on every keystroke#2698

Open
RabbiIslamRony wants to merge 1 commit intosovware:developmentfrom
RabbiIslamRony:fix/section-name-input-focus-loss
Open

fix: prevent Section Name input from losing focus on every keystroke#2698
RabbiIslamRony wants to merge 1 commit intosovware:developmentfrom
RabbiIslamRony:fix/section-name-input-focus-loss

Conversation

@RabbiIslamRony
Copy link
Member

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Security fix
  • Improvement
  • New Feature
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • Text changes
  • Other... Please describe:

Description

In the Add Listing Form Builder, opening Configure Section and typing in the Section Name input caused the field to lose focus after every keystroke. https://prnt.sc/B4yEqT7pE0Ii

🔍 Root Cause

The fieldListComponentKey computed property in
Form_Builder_Widget_Group_Header_Component.vue included groupData.label in the Vue :key.

Each character update:

  • Changed the label
  • Changed the key
  • Forced Vue to destroy & recreate field-list-component
  • Destroyed the input DOM → focus lost

✅ Fix

  • Removed groupData.label from fieldListComponentKey to keep the key stable during typing.
  • Added deep: true to the value watcher in Field_List_Component.vue so label updates from other sources (e.g. inline header label editing) still sync properly without relying on key-based re-rendering.

📂 Files Changed

  • assets/src/js/admin/vue/modules/form-builder-modules/widget-group-components/Form_Builder_Widget_Group_Header_Component.vue
  • assets/src/js/admin/vue/modules/Field_List_Component.vue

Any linked issues

Fixes #
#2655

Checklist

The Section Name input inside the Configure Section panel lost focus
after typing a single character. This happened because the
fieldListComponentKey computed property included groupData.label in
the key. Every keystroke updated the label, changed the key, and
forced Vue to destroy and recreate the field-list-component — along
with its input DOM element.

Changes:
- Remove groupData.label from fieldListComponentKey so the key stays
  stable while the user types (Form_Builder_Widget_Group_Header_Component.vue)
- Add deep: true to the value watcher in Field_List_Component.vue so
  that external label changes (e.g. inline header editing) still
  propagate to the Section Name input without the key-based re-render hack
@RabbiIslamRony RabbiIslamRony marked this pull request as ready for review February 10, 2026 10:01
@Armanul46 Armanul46 added this to the v8.5.11 milestone Feb 16, 2026
@iamibrahimriaz
Copy link
Collaborator

Looks Good.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

Comments