这是indexloc提供的服务,不要输入任何密码
Skip to content

highlightFirstSuggestion bugs #489

@fanfoorik

Description

@fanfoorik

Bugs example(codepen)

I have "highlighted:" label and simple input element on a page.

Set highlightFirstSuggestion to true.
Provide onSuggestionHighlighted method that returns suggested object and sets highlighted label value to suggested.name property.

  • First bug:
    1. Focus on the input field
    2. Type "c". First highlighted item is "C", - "highlighted: C". Its ok!
    3. Continue typing "+" to be "c+". First highlighted item is "C++", but highlighted label still "C" - "highlighted: C". not ok!

Observed behaviour: "highlighted: C"
Expected behaviour: "highlighted: C++"

  • Second bug:
    1. Focus on the input field
    2. Type "c". First highlighted item is "C", - "highlighted: C". Its ok!
    3. Move your mouse on other suggested items. onSuggestionHighlighted doesnt work properly and highlighted label is still "C" - "highlighted: C". not ok!

Observed behaviour: "highlighted: C".
Expected behaviour: "highlighted: C++" or "highlighted: C#" or "highlighted: Clojure"... up to what element you hover on".

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions