From b2005d4f63110ef876180b7b038b298e100b0e9c Mon Sep 17 00:00:00 2001 From: bobzel Date: Mon, 31 Aug 2020 16:56:16 -0400 Subject: fixed scrolling of browser when following a link in nested web page that leads to another palce within that web page --- src/client/views/MainView.scss | 3 --- src/client/views/MainView.tsx | 6 +++--- src/client/views/collections/CollectionDockingView.tsx | 2 +- src/mobile/MobileInterface.tsx | 1 - 4 files changed, 4 insertions(+), 8 deletions(-) (limited to 'src') diff --git a/src/client/views/MainView.scss b/src/client/views/MainView.scss index 43264d2e0..93cc47215 100644 --- a/src/client/views/MainView.scss +++ b/src/client/views/MainView.scss @@ -176,9 +176,6 @@ .mainView-menuPanel { min-width: var(--menuPanelWidth); background-color: #121721; - height: calc(100% - $searchpanel-height); - //overflow-y: scroll; - //overflow-x: hidden; .collectionStackingView { scrollbar-width: none; diff --git a/src/client/views/MainView.tsx b/src/client/views/MainView.tsx index 96a596f15..d479f0f78 100644 --- a/src/client/views/MainView.tsx +++ b/src/client/views/MainView.tsx @@ -80,6 +80,7 @@ export class MainView extends React.Component { propertiesWidth = () => Math.max(0, Math.min(this._panelWidth - 50, CurrentUserUtils.propertiesWidth || 0)); componentDidMount() { + new InkStrokeProperties(); DocServer.setPlaygroundFields(["dataTransition", "_viewTransition", "_panX", "_panY", "_viewScale", "_viewType", "_chromeStatus"]); // can play with these fields on someone else's DocServer.GetRefField("rtfProto").then(proto => (proto instanceof Doc) && reaction(() => StrCast(proto.BROADCAST_MESSAGE), msg => msg && alert(msg))); @@ -107,7 +108,6 @@ export class MainView extends React.Component { constructor(props: Readonly<{}>) { super(props); - new InkStrokeProperties(); MainView.Instance = this; CurrentUserUtils._urlState = HistoryUtil.parseUrl(window.location) || {} as any; @@ -299,7 +299,7 @@ export class MainView extends React.Component { @computed get flyout() { return !this._sidebarContent || !this._flyoutWidth ? (null) :
-
+
+ return (
document.getElementById("root")!.scrollTop = 0} ref={this._mainViewRef}> {this.inkResources} diff --git a/src/client/views/collections/CollectionDockingView.tsx b/src/client/views/collections/CollectionDockingView.tsx index d8e95bcdc..5f05b1193 100644 --- a/src/client/views/collections/CollectionDockingView.tsx +++ b/src/client/views/collections/CollectionDockingView.tsx @@ -261,7 +261,7 @@ export class CollectionDockingView extends CollectionSubView(doc => doc) { this._ignoreStateChange = ""; }); setTimeout(() => this.setupGoldenLayout(), 0); - window.addEventListener('resize', this.onResize); // bcz: would rather add this event to the parent node, but resize events only come from Window + //window.addEventListener('resize', this.onResize); // bcz: would rather add this event to the parent node, but resize events only come from Window } } diff --git a/src/mobile/MobileInterface.tsx b/src/mobile/MobileInterface.tsx index 3eae2841d..ae2c07c8e 100644 --- a/src/mobile/MobileInterface.tsx +++ b/src/mobile/MobileInterface.tsx @@ -69,7 +69,6 @@ export class MobileInterface extends React.Component { constructor(props: Readonly<{}>) { super(props); - new InkStrokeProperties(); this._library = CurrentUserUtils.setupLibrary(Doc.UserDoc()); // to access documents in Dash Web MobileInterface.Instance = this; } -- cgit v1.2.3-70-g09d2