Skip to content

Commit

Permalink
Back out "Allow text links to be navigatable via keyboard by default"
Browse files Browse the repository at this point in the history
Summary:
This was causing links to not ellipsize and be scrollable. Gonna revert while I see if I can workaround

Changelog: [Internal]

Reviewed By: NickGerleman

Differential Revision: D68596950

fbshipit-source-id: 432a059d0b10acbb45d34e0c98763680d280937b
  • Loading branch information
joevilches authored and facebook-github-bot committed Jan 24, 2025
1 parent 5ea7594 commit 1b710a0
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 31 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ public void updateExtraData(ReactTextView view, Object extraData) {
if (update.containsImages()) {
TextInlineImageSpan.possiblyUpdateInlineImageSpans(spannable, view);
}
view.setText(update);

// If this text view contains any clickable spans, set a view tag and reset the accessibility
// delegate so that these can be picked up by the accessibility system.
Expand All @@ -105,16 +106,7 @@ public void updateExtraData(ReactTextView view, Object extraData) {
new ReactAccessibilityDelegate.AccessibilityLinks(clickableSpans, spannable));
ReactAccessibilityDelegate.resetDelegate(
view, view.isFocusable(), view.getImportantForAccessibility());
// To enable navigation via keyboard, which is distinct from accessibility navigation.
view.setMovementMethod(ReactLinkMovementMethod.INSTANCE);
} else {
view.setMovementMethod(null);
view.setTag(R.id.accessibility_links, null);
ReactAccessibilityDelegate.resetDelegate(
view, view.isFocusable(), view.getImportantForAccessibility());
}

view.setText(update);
}
}

Expand Down

0 comments on commit 1b710a0

Please sign in to comment.