Skip to content

Commit

Permalink
Avoid leaking of Modal view
Browse files Browse the repository at this point in the history
  • Loading branch information
marecar3 committed Feb 6, 2019
1 parent c36a904 commit b5adc60
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions packages/block-library/src/image/edit.native.js
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ export default class ImageEdit extends React.Component {

const getInspectorControls = () => (
<BottomSheet
isVisible={ this.state.showSettings }
isVisible={ true }
onClose={ onImageSettingsClose }
hideHeader
>
Expand Down Expand Up @@ -247,7 +247,7 @@ export default class ImageEdit extends React.Component {

const getMediaOptions = () => (
<BottomSheet
isVisible={ this.state.showMediaOptions }
isVisible={ true }
onClose={ onMediaOptionsClose }
hideHeader
>
Expand Down Expand Up @@ -290,7 +290,7 @@ export default class ImageEdit extends React.Component {
if ( ! url ) {
return (
<View style={ { flex: 1 } } >
{ getMediaOptions() }
{ this.state.showMediaOptions && getMediaOptions() }
<MediaPlaceholder
onMediaOptionsPressed={ onMediaOptionsButtonPressed }
/>
Expand Down Expand Up @@ -335,8 +335,8 @@ export default class ImageEdit extends React.Component {

return (
<View style={ { flex: 1 } } >
{ getInspectorControls() }
{ getMediaOptions() }
{ this.state.showSettings && getInspectorControls() }
{ this.state.showMediaOptions && getMediaOptions() }
<ImageBackground
style={ { width: finalWidth, height: finalHeight, opacity } }
resizeMethod="scale"
Expand Down

0 comments on commit b5adc60

Please sign in to comment.