diff --git a/js/ui/navbarButton.js b/js/ui/navbarButton.js index 31bfb3376..e633ddead 100644 --- a/js/ui/navbarButton.js +++ b/js/ui/navbarButton.js @@ -52,15 +52,20 @@ class NavbarButton { this.setState(initialButtonState) browser.on('navbar-resize', navbarButtonCSSClass => { - const key = 'igv-navbar-icon-button' === navbarButtonCSSClass ? 'image' : 'text' - if (key !== this.responsiveKey) { - this.responsiveKey = key - this.configureButton(title) - this.setState(undefined) - } + this.navbarResizeHandler(navbarButtonCSSClass) }) } + + navbarResizeHandler(navbarButtonCSSClass) { + const key = 'igv-navbar-icon-button' === navbarButtonCSSClass ? 'image' : 'text' + if (key !== this.responsiveKey) { + this.responsiveKey = key + this.configureButton(this.title) + this.setState(undefined) + } + } + configureButton(title) { this.groupElement = undefined diff --git a/js/ui/saveImageControl.js b/js/ui/saveImageControl.js index f42411035..85f80e916 100644 --- a/js/ui/saveImageControl.js +++ b/js/ui/saveImageControl.js @@ -93,6 +93,11 @@ class SaveImageControl extends NavbarButton { } + navbarResizeHandler(navbarButtonCSSClass) { + this.dropdown.dismiss() + super.navbarResizeHandler(navbarButtonCSSClass) + } + } export default SaveImageControl