diff --git a/new-client/src/plugins/BaseWindowPlugin.js b/new-client/src/plugins/BaseWindowPlugin.js index 7b45543e5..ff8fa8af6 100644 --- a/new-client/src/plugins/BaseWindowPlugin.js +++ b/new-client/src/plugins/BaseWindowPlugin.js @@ -278,9 +278,14 @@ class BaseWindowPlugin extends React.PureComponent { } renderControlButton() { + // Special case: if there are no plugins with target "toolbar", we want to render the Control button on small screens + const hasToolbarTarget = this.props.app.config.mapConfig.tools.filter( + (tool) => tool.options && tool.options.target === "toolbar" + ); + return createPortal( // Hide Control button on small screens, see renderDrawerButton too - + 0}>