Skip to content

Commit

Permalink
Stop checking for active formats when doing delete. (#22446)
Browse files Browse the repository at this point in the history
On the web this checking the active formats makes sense because you
have a mode where you are inside a selection ("active selection").
That doesn't happen on mobile so having a selection active shouldn't
block the deletion and merge.
  • Loading branch information
SergioEstevao committed May 20, 2020
1 parent 87557ea commit 84e7e93
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions packages/rich-text/src/component/index.native.js
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,6 @@ export class RichText extends Component {
const isReverse = keyCode === BACKSPACE;

const { onDelete, __unstableMultilineTag: multilineTag } = this.props;
const { activeFormats = [] } = this.state;
this.lastEventCount = event.nativeEvent.eventCount;
this.comesFromAztec = true;
this.firedAfterTextChanged = event.nativeEvent.firedAfterTextChanged;
Expand Down Expand Up @@ -353,7 +352,6 @@ export class RichText extends Component {
if (
! onDelete ||
! isCollapsed( value ) ||
activeFormats.length ||
( isReverse && start !== 0 ) ||
( ! isReverse && end !== text.length )
) {
Expand Down

0 comments on commit 84e7e93

Please sign in to comment.