Autocomplete doesn't trigger `formUpdated`

Created on 30 November 2016, almost 8 years ago
Updated 14 August 2024, 3 months ago

Problem/Motivation

The formUpdated event isn't triggered when selecting an option from the autocomplete suggestion list. This problem only exists when using the selection dropdown, while typing in the actual textfield the event triggers nicely.

Steps to reproduce

  1. Create a form with an autocomplete field of any entity.
  2. Subscribe to the form's "formUpdated" event using jQuery.
  3. Start typing a value in the autocomplete and select any suggested value from the list.
  4. The last "formUpdated" event will be the input event, but the selected value from the suggested ones will not trigger the "formUpdated" event.

Proposed resolution

Explicitly triggering the formUpdated event from the selectHandler seems to be the most straight forward solution.

Remaining tasks

  1. Text coverage.

User interface changes

None

API changes

None

Data model changes

None

๐Ÿ› Bug report
Status

Needs work

Version

11.0 ๐Ÿ”ฅ

Component
Javascriptย  โ†’

Last updated 2 days ago

  • Maintained by
  • ๐Ÿ‡ฌ๐Ÿ‡งUnited Kingdom @justafish
  • ๐Ÿ‡ซ๐Ÿ‡ทFrance @nod_
Created by

๐Ÿ‡ณ๐Ÿ‡ฑNetherlands Erik Frรจrejean ๐Ÿดโ€โ˜ ๏ธ

Live updates comments and jobs are added and updated live.
  • Needs tests

    The change is currently missing an automated test that fails when run with the original code, and succeeds when the bug has been fixed.

Sign in to follow issues

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024