Page MenuHomePhabricator

onFocusableRerender calls updateDimensions() unsafely
Open, MediumPublic

Description

When a focusable GeneratedContentNode receives an update event, GCN causes a rerender and emits the rerender event. Focusable then calls updateDimensions(), but that's unsafe because at the time the update event was emitted, the linear model and the selection are out of sync.

Right now this doesn't cause any nastiness because updateDimensions() doesn't actually query the selection in these cases due to caching in getRelatedSources(), but that's fragile. Instead, maybe we should debounce this updateDimensions() call?

Event Timeline

Catrope raised the priority of this task from to Needs Triage.
Catrope updated the task description. (Show Details)
Catrope subscribed.
Jdforrester-WMF set Security to None.