Skip to content

Clicking the non-input area of a select inside a Bard set node-selects the whole set #15207

Description

@5k18a

Bug description

Clicking a select field inside a Bard set — specifically the non-input parts of the custom dropdown widget (the value area, the chevron, its padding) — node-selects the entire set: the whole set card gets the selection highlight, as if all of its content was selected. The dropdown itself still opens, so the field remains usable, but the visual "everything is selected" state is confusing for editors.

More importantly, while the set is node-selected, the DOM selection spans the whole set (as described in #15049), so pressing a key at that moment replaces/deletes the entire set (recoverable with Ctrl+Z, but easy to trigger accidentally right after interacting with a dropdown).

Expected: clicks anywhere on an interactive form control inside a set (including the div-based parts of the custom select widget) should be treated like clicks on inputs — they should not create a node selection of the set.

The mechanism matches what #15049 documents ("clicking a non-interactive area inside a set makes ProseMirror node-select it; that node selection is backed by a real DOM selection spanning the whole set"). That PR fixed the dragstart symptom; the click-through-form-widget path still node-selects.

How to reproduce

  1. Create a Bard field with a set that contains a select field with a few options (e.g. a "Display type" select).
  2. Edit an entry in the CP, add the set to the Bard field.
  3. Click the select — aim at the value area or the chevron rather than typing into it.
  4. The whole set card gets highlighted (node selection) while the dropdown opens.
  5. With the set node-selected, press any printable key or Backspace — the whole set is replaced/removed.

Logs

(no relevant logs — CP/editor front-end behaviour)

Environment

Environment
Laravel Version: 13.19.0
PHP Version: 8.4.24
Composer Version: 2.8.8
Environment: local
Debug Mode: ENABLED
Maintenance Mode: OFF
Timezone: UTC
Locale: en

Cache
Config: NOT CACHED
Events: NOT CACHED
Routes: NOT CACHED
Views: CACHED

Drivers
Broadcasting: log
Cache: file
Database: sqlite
Logs: stack / single
Mail: smtp
Queue: sync
Session: file

Storage
public/storage: LINKED

Statamic
Addons: 10
License Key: Set
Sites: 13 (Polski, Čeština, Dansk, and 10 more)
Stache Watcher: Enabled (auto)
Static Caching: Disabled
Version: 6.27.1 PRO

Statamic Addons
5k18a/blog-internal-links: 0.5.0
aryehraber/statamic-captcha: 1.17.0
chrisvasey/statamic-boost: 1.2.1
el-schneider/statamic-magic-translator: 0.3.0
eminos/statamic-iconify: 2.1.0
skalisty/ai-chat: 0.4.1
skalisty/comments: 0.2.4
skalisty/wysiwyg-html-fieldtype: 1.1.0
statamic/seo-pro: 7.13.1
superinteractive/statamic-super-admin-toolbar: 2.1.1

Installation

Existing Laravel app

Additional details

  • Multisite (13 sites). Observed on 6.27.1 after upgrading from 6.26.0, but comparing the two tags, Set.js/Set.vue click handling looks unchanged, so it may simply be more noticeable now rather than a fresh regression.
  • Reproduced with plain select fields defined in a fieldset imported into the Bard set (no custom fieldtypes involved in the affected set).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions