preline icon indicating copy to clipboard operation
preline copied to clipboard

Text inputs inside dropdown not working

Open cpgo opened this issue 3 months ago • 2 comments

Summary

After upgrading from 2.6 to 3.2.3 text inputs inside dropdowns not working anymore

Steps to Reproduce

  1. Go to https://preline.co/pro/examples/dropdowns.html#assign
  2. Try to type on the input field

Poking around the code I think the issue is related to HSAccessibilityObserver overriding the events but not sure.

Demo Link

https://preline.co/pro/examples/dropdowns.html#assign

Expected Behavior

I should be able to type on the input

Actual Behavior

I'm not able to type on the input, sometimes typing numbers work which makes the bug even stranger.

Screenshots

No response

cpgo avatar Sep 19 '25 15:09 cpgo

As a hotfix I added stopImmediatePropagation to the relevant inputs keydown event.

cpgo avatar Sep 19 '25 16:09 cpgo

I can confirm I'm seeing the same issue. I tried the chat bubble example on the demo page and couldn't type because focus is stolen on every keystroke.

Adding stopImmediatePropagation to the input keydown handler seems like a good enough workaround for now. Here's what works for me in a Stimulus controller:

  connect() {
    this.element.addEventListener("keydown", event => {
      event.stopImmediatePropagation()
    })
  }

lenart avatar Oct 22 '25 18:10 lenart