fix: disable global scrollbars and reposition search component to the left edge of the editor
This commit is contained in:
@@ -2935,6 +2935,15 @@ function EditorPageContent() {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div style={{ display: "flex", minHeight: "100vh" }}>
|
<div style={{ display: "flex", minHeight: "100vh" }}>
|
||||||
|
<style>{`
|
||||||
|
html, body {
|
||||||
|
overflow: hidden !important;
|
||||||
|
scrollbar-width: none !important;
|
||||||
|
}
|
||||||
|
html::-webkit-scrollbar, body::-webkit-scrollbar {
|
||||||
|
display: none !important;
|
||||||
|
}
|
||||||
|
`}</style>
|
||||||
{!isReplayEditMode && !isAnyPreviewMode ? (
|
{!isReplayEditMode && !isAnyPreviewMode ? (
|
||||||
<>
|
<>
|
||||||
<Editor
|
<Editor
|
||||||
@@ -3058,7 +3067,7 @@ function EditorPageContent() {
|
|||||||
onFocusPlace={handleFocusPresentPlace}
|
onFocusPlace={handleFocusPresentPlace}
|
||||||
onFocusHistoricalGeometry={handleFocusHistoricalGeometry}
|
onFocusHistoricalGeometry={handleFocusHistoricalGeometry}
|
||||||
onClearFocus={clearPresentPlaceFocus}
|
onClearFocus={clearPresentPlaceFocus}
|
||||||
rightOffset={isReplayPreviewWikiSidebarOpen ? previewSidebarWidth + 48 : 18}
|
leftOffset={18}
|
||||||
/>
|
/>
|
||||||
) : null}
|
) : null}
|
||||||
{isReplayPreviewMode ? (
|
{isReplayPreviewMode ? (
|
||||||
|
|||||||
@@ -62,6 +62,7 @@ export default function BackgroundLayersPanel({
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<aside
|
<aside
|
||||||
|
className="no-scrollbar"
|
||||||
style={{
|
style={{
|
||||||
width,
|
width,
|
||||||
background: "#111827",
|
background: "#111827",
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ type Props = {
|
|||||||
onFocusPlace: (place: PresentPlaceSelection) => void;
|
onFocusPlace: (place: PresentPlaceSelection) => void;
|
||||||
onFocusHistoricalGeometry: (payload: HistoricalGeometryFocusPayload) => void;
|
onFocusHistoricalGeometry: (payload: HistoricalGeometryFocusPayload) => void;
|
||||||
onClearFocus: () => void;
|
onClearFocus: () => void;
|
||||||
rightOffset?: number;
|
leftOffset?: number;
|
||||||
};
|
};
|
||||||
|
|
||||||
export default function PresentPlaceSearch({
|
export default function PresentPlaceSearch({
|
||||||
@@ -42,7 +42,7 @@ export default function PresentPlaceSearch({
|
|||||||
onFocusPlace,
|
onFocusPlace,
|
||||||
onFocusHistoricalGeometry,
|
onFocusHistoricalGeometry,
|
||||||
onClearFocus,
|
onClearFocus,
|
||||||
rightOffset = 18,
|
leftOffset = 18,
|
||||||
}: Props) {
|
}: Props) {
|
||||||
const [mode, setMode] = useState<SearchMode>("present");
|
const [mode, setMode] = useState<SearchMode>("present");
|
||||||
const [query, setQuery] = useState("");
|
const [query, setQuery] = useState("");
|
||||||
@@ -280,7 +280,7 @@ export default function PresentPlaceSearch({
|
|||||||
style={{
|
style={{
|
||||||
position: "absolute",
|
position: "absolute",
|
||||||
top: 10,
|
top: 10,
|
||||||
right: rightOffset,
|
left: leftOffset,
|
||||||
zIndex: 18,
|
zIndex: 18,
|
||||||
width: "min(392px, calc(100vw - 36px))",
|
width: "min(392px, calc(100vw - 36px))",
|
||||||
pointerEvents: "auto",
|
pointerEvents: "auto",
|
||||||
|
|||||||
Reference in New Issue
Block a user