From 26991f460ca0f5ffead41aca93fd324aebde9e6f Mon Sep 17 00:00:00 2001
From: IRBorisov <8611739+IRBorisov@users.noreply.github.com>
Date: Wed, 29 May 2024 22:40:23 +0300
Subject: [PATCH] Small UI fixes for Safari
---
rsconcept/frontend/src/app/ApplicationLayout.tsx | 2 +-
rsconcept/frontend/src/app/Navigation/Logo.tsx | 2 +-
rsconcept/frontend/src/app/Navigation/Navigation.tsx | 4 ++--
rsconcept/frontend/src/components/ui/SelectTree.tsx | 11 ++++++++++-
.../frontend/src/pages/ManualsPage/TopicsStatic.tsx | 5 +++--
5 files changed, 17 insertions(+), 7 deletions(-)
diff --git a/rsconcept/frontend/src/app/ApplicationLayout.tsx b/rsconcept/frontend/src/app/ApplicationLayout.tsx
index 4d6eee2a..f3b15914 100644
--- a/rsconcept/frontend/src/app/ApplicationLayout.tsx
+++ b/rsconcept/frontend/src/app/ApplicationLayout.tsx
@@ -23,7 +23,7 @@ function ApplicationLayout() {
);
diff --git a/rsconcept/frontend/src/app/Navigation/Navigation.tsx b/rsconcept/frontend/src/app/Navigation/Navigation.tsx
index a8c5cd9a..e7f82256 100644
--- a/rsconcept/frontend/src/app/Navigation/Navigation.tsx
+++ b/rsconcept/frontend/src/app/Navigation/Navigation.tsx
@@ -37,14 +37,14 @@ function Navigation() {
-
+
diff --git a/rsconcept/frontend/src/components/ui/SelectTree.tsx b/rsconcept/frontend/src/components/ui/SelectTree.tsx
index 0bc0a810..0ae42afa 100644
--- a/rsconcept/frontend/src/components/ui/SelectTree.tsx
+++ b/rsconcept/frontend/src/components/ui/SelectTree.tsx
@@ -67,6 +67,15 @@ function SelectTree
({
[onFoldItem]
);
+ const handleSetValue = useCallback(
+ (event: CProps.EventMouse, target: ItemType) => {
+ event.preventDefault();
+ event.stopPropagation();
+ setValue(target);
+ },
+ [setValue]
+ );
+
return (
@@ -84,7 +93,7 @@ function SelectTree({
)}
data-tooltip-id={globals.tooltip}
data-tooltip-content={getDescription(item)}
- onClick={() => setValue(item)}
+ onClick={event => handleSetValue(event, item)}
initial={{ ...animateSideAppear.initial }}
animate={{ ...animateSideAppear.animate }}
exit={{ ...animateSideAppear.exit }}
diff --git a/rsconcept/frontend/src/pages/ManualsPage/TopicsStatic.tsx b/rsconcept/frontend/src/pages/ManualsPage/TopicsStatic.tsx
index 58f94d6c..0ca8dc54 100644
--- a/rsconcept/frontend/src/pages/ManualsPage/TopicsStatic.tsx
+++ b/rsconcept/frontend/src/pages/ManualsPage/TopicsStatic.tsx
@@ -24,14 +24,15 @@ function TopicsStatic({ activeTopic, onChangeTopic }: TopicsStaticProps) {
getDescription={describeHelpTopic}
className={clsx(
'sticky top-0 left-0',
- 'w-[14.5rem] cc-scroll-y',
+ 'min-w-[14.5rem] max-w-[14.5rem] sm:min-w-[12.5rem] sm:max-w-[12.5rem] md:min-w-[14.5rem] md:max-w-[14.5rem]',
+ 'cc-scroll-y',
'self-start',
'border divide-y rounded-none',
'clr-controls',
'text-xs sm:text-sm',
'select-none'
)}
- style={{ maxHeight: calculateHeight('2.25rem + 2px') }}
+ style={{ maxHeight: calculateHeight('1rem + 2px') }}
/>
);
}