diff --git a/Classes/Controller/BackendController.php b/Classes/Controller/BackendController.php index 3d6bc860f9..e679d5f6bd 100644 --- a/Classes/Controller/BackendController.php +++ b/Classes/Controller/BackendController.php @@ -217,6 +217,9 @@ protected function getSiteNodeForLoggedInUser(): ?NodeInterface protected function findNodeToEdit(): ?NodeInterface { $siteNode = $this->getSiteNodeForLoggedInUser(); + if (!$siteNode) { + throw new \RuntimeException('Could not find site node for current user.', 1697707361); + } $reflectionMethod = new \ReflectionMethod($this->backendRedirectionService, 'getLastVisitedNode'); $reflectionMethod->setAccessible(true); $node = $reflectionMethod->invoke($this->backendRedirectionService, $siteNode->getContext()->getWorkspaceName()); diff --git a/packages/neos-ui-editors/src/Editors/Range/index.js b/packages/neos-ui-editors/src/Editors/Range/index.js index c4d2629d12..f0fa8d4b98 100755 --- a/packages/neos-ui-editors/src/Editors/Range/index.js +++ b/packages/neos-ui-editors/src/Editors/Range/index.js @@ -41,8 +41,9 @@ class RangeEditor extends PureComponent { handleChange = event => { const {options} = this.props; const {target} = event; + const useParseInt = (options.step || 1) % 1 === 0; - let value = parseInt(target.value, 10); + let value = useParseInt ? parseInt(target.value, 10) : parseFloat(target.value, 10); if (isNaN(value)) { return; } @@ -64,6 +65,10 @@ class RangeEditor extends PureComponent { const options = {...this.constructor.defaultProps.options, ...this.props.options}; const {value, highlight} = this.props; const valueAsString = value === 0 ? '0' : (value || ''); + // Calculate the width of the input field based on the length of the min, max and step values + const numLength = value => value.toString().length; + const additionalStepLength = numLength(options.step) - 1; + const styleWidth = Math.max(numLength(options.min), numLength(options.max)) + additionalStepLength + 'ch'; return (
{options.unit} diff --git a/packages/neos-ui/src/Containers/RightSideBar/Inspector/index.js b/packages/neos-ui/src/Containers/RightSideBar/Inspector/index.js index 73713e839c..74503df9ba 100644 --- a/packages/neos-ui/src/Containers/RightSideBar/Inspector/index.js +++ b/packages/neos-ui/src/Containers/RightSideBar/Inspector/index.js @@ -37,7 +37,7 @@ import style from './style.module.css'; const shouldShowUnappliedChangesOverlay = isDirty && !shouldPromptToHandleUnappliedChanges; const shouldShowSecondaryInspector = selectors.UI.Inspector.shouldShowSecondaryInspector(state); const focusedNode = selectors.CR.Nodes.focusedSelector(state); - const parentNode = selectors.CR.Nodes.nodeByContextPath(state)(focusedNode.parent); + const parentNode = focusedNode ? selectors.CR.Nodes.nodeByContextPath(state)(focusedNode.parent) : null; return { focusedNode,