question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Selected option is not highlighted when pressing up down navigation

See original GitHub issue

The root cause is: outer component was using shallow-compare to determine when it should re-render:

  shouldComponentUpdate(nextProps, nextState) {
    return shallowCompare(this, nextProps, nextState)
  }

And the way mentions plugin triggers an update is: https://github.com/draft-js-plugins/draft-js-plugins/blob/master/draft-js-mention-plugin/src/MentionSuggestions/index.js#L245

    // to force a re-render of the outer component to change the aria props
    this.props.store.setEditorState(this.props.store.getEditorState());

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
deanshubcommented, May 10, 2017

I belive I can make one this weekend

0reactions
nikgrafcommented, May 25, 2017

ok cool, then I close this issue for now and open it if we identify this wasn’t actually the problem

Read more comments on GitHub >

github_iconTop Results From Across the Web

Dropdown menu (select) not highlighting ... - Stack Overflow
I'm building a search form but have something strange going on with the selected="selected" option not being highlighted. The form's pulling ...
Read more >
Typeahead Dropdown does not highlight/select first ... - GitHub
When implementing typeahead with <ng-option>, the dropdown items do not get marked when only using keyboard to navigate.
Read more >
How to Highlight or Select Text - Computer Hope
To select only certain items from the list, hold down Ctrl , and click each item you want to highlight. Repeat this action...
Read more >
<select>: The HTML Select element - HTML - MDN Web Docs
Selecting an item at the top or bottom of the range they want to select using the Up and Down cursor keys to...
Read more >
3 Ways to Fix the Arrow Keys Not Working in Excel - MakeUseOf
Create a new document by clicking on the File menu and select New. Copy the following code and paste it into your document....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found