Skip to content

Commit

Permalink
[RNMobile] Fix Android-only issue related to block toolbar not being …
Browse files Browse the repository at this point in the history
…displayed on some blocks in UBE (#51131)

* Query editor element only in the function is needed

We experienced on Android that the `editor` variable might be already defined in some cases when loading UBE's behavior overrides.

* Update `react-native-editor` changelog
  • Loading branch information
fluiddot authored May 31, 2023
1 parent 08deb84 commit d51edb9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,8 @@ if ( isAndroid() ) {
manageTextSelectonContextMenu();
}

const editor = document.querySelector( '#editor' );

function _toggleBlockSelectedClass( isBlockSelected ) {
const editor = document.querySelector( '#editor' );
if ( isBlockSelected ) {
editor.classList.add( 'is-block-selected' );
} else {
Expand Down
1 change: 1 addition & 0 deletions packages/react-native-editor/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ For each user feature we should also add a importance categorization label to i
-->

## Unreleased
- [**] Fix Android-only issue related to block toolbar not being displayed on some blocks in UBE [#51131]

## 1.96.0
- [**] Tapping on all nested blocks gets focus directly instead of having to tap multiple times depending on the nesting levels. [#50672]
Expand Down

1 comment on commit d51edb9

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Flaky tests detected in d51edb9.
Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.

🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/5133894408
📝 Reported issues:

Please sign in to comment.