fix bug that occurs when escape is hit on dropdowns

main
Mike Fix 6 years ago
parent d4538305b9
commit f5f53f17d6

@ -257,8 +257,10 @@ class Editor extends React.Component {
} }
updateLanguage(language) { updateLanguage(language) {
if (language) {
this.updateSetting('language', language.mime || language.mode) this.updateSetting('language', language.mime || language.mode)
} }
}
updateBackground({ photographer, ...changes } = {}) { updateBackground({ photographer, ...changes } = {}) {
if (photographer) { if (photographer) {

@ -67,6 +67,7 @@ class Themes extends React.PureComponent {
} }
handleThemeSelected = theme => { handleThemeSelected = theme => {
if (theme) {
const { toggleVisibility, update } = this.props const { toggleVisibility, update } = this.props
if (theme.id === 'create') { if (theme.id === 'create') {
toggleVisibility() toggleVisibility()
@ -75,6 +76,7 @@ class Themes extends React.PureComponent {
update(theme.id) update(theme.id)
} }
} }
}
create = theme => { create = theme => {
this.props.toggleVisibility() this.props.toggleVisibility()

Loading…
Cancel
Save