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 and Gerardo committed May 31, 2023
1 parent 7bb1e59 commit 6857bf8
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

0 comments on commit 6857bf8

Please sign in to comment.