Page MenuHomePhabricator

Link suggestion context doesn't work with changing selection with keyboard, or by dragging.
Closed, DuplicatePublic

Description

  • Place the cursor in front of a word
  • Press shift-right a few times to select the word
  • Observe there is no suggestion for the word you selected, maybe one for the first letter in your word instead

The issue here is contextChange events are only fired in certain circumstances, e.g. when the cursor moves into a differently annotated selection, or the selection goes from collapsed to not-collapsed. The only way the tool works as-is is if the word is selected in one action, e.g. by double clicking.

We would not want to increase the number of contextChange events fired (as this could negatively affect performance), so you probably want to change the widget to operate independently of the context system, and listen to surface selection change events.

Event Timeline

This is pending work for an in-progress ticket (T191007#4255905).
I'll close the current ticket as a duplicate, and copy the notes to the main one since these seem quite useful. Thanks!