Skip to content

Commit

Permalink
more isInteractiveHighlighting conversion (oops), #1653
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Kauzmann <[email protected]>
  • Loading branch information
zepumph committed Sep 12, 2024
1 parent f428b45 commit d5da2a7
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions js/overlays/HighlightOverlay.ts
Original file line number Diff line number Diff line change
Expand Up @@ -816,10 +816,12 @@ export default class HighlightOverlay implements TOverlay {
private onInteractiveHighlightChange(): void {

if ( assert ) {
const interactiveHighlightNode = this.node as InteractiveHighlightingNode;
const lockedPointerFocus = this.display.focusManager.lockedPointerFocusProperty.value;
assert( interactiveHighlightNode || ( lockedPointerFocus && lockedPointerFocus.trail.lastNode() === this.node ),
'Update should only be necessary if Node is activated with a Pointer or pointer focus is locked during interaction' );
assert && assert( isInteractiveHighlighting( this.node ) );
if ( isInteractiveHighlighting( this.node ) ) {
const lockedPointerFocus = this.display.focusManager.lockedPointerFocusProperty.value;
assert && assert( this.node || ( lockedPointerFocus && lockedPointerFocus.trail.lastNode() === this.node ),
'Update should only be necessary if Node is activated with a Pointer or pointer focus is locked during interaction' );
}
}

// Prefer the trail to the 'locked' highlight
Expand Down

0 comments on commit d5da2a7

Please sign in to comment.