pacocoursey / cmdk

Fast, unstyled command menu React component.
https://cmdk.paco.me
MIT License
9.04k stars 259 forks source link

`querySelector` issue introduced in 0.2.1 #212

Closed etcd closed 4 months ago

etcd commented 5 months ago

The latest update v0.2.1 introduces a bug that was not present in v0.2.0. The following error is thrown when the child of a CommandItem includes a string with the quote character ("):

SyntaxError: Failed to execute 'querySelector' on 'Element': '[cmdk-item=""][data-value="""]' is not a valid selector.
pacocoursey commented 5 months ago

Fixed in 8aecf2d22c288872a3908ef3041a9279d5f29d60, will release soon.

theboxer commented 5 months ago

@pacocoursey any ETA on when the new release will be out?

etcd commented 5 months ago

@pacocoursey Sorry to bother again, but this is a major regression that was introduced in a minor version bump, so this will introduce silent runtime failures for more people (anyone who pinned the minor version) the longer a hotfix isn't deployed

gokulkrishh commented 4 months ago

Thanks @pacocoursey. Looking forward for the fix.

pacocoursey commented 4 months ago

https://github.com/pacocoursey/cmdk/releases/tag/v1.0.0