在键盘导航期间,selectChip() 发生了 TypeError,并且由于 Cash .add() 是不可变的,导致 destroy() 失败。

作者: codeCraft-Ritik创建于 2026年9月3日更新于 2026年9月3日

Describe the Bug

In the Chips component (js/chips.js), keyboard navigation (pressing the Arrow keys or Backspace on an empty input) causes an uncaught runtime error: TypeError: Cannot read property 'focus' of undefined (or Cannot read properties of undefined (reading 'focus')).

Additionally, calling .destroy() on a Chips instance fails to remove the rendered chips from the DOM.

内容来源: Dogfalo/materialize