diff options
author | bobzel <zzzman@gmail.com> | 2020-08-31 16:56:16 -0400 |
---|---|---|
committer | bobzel <zzzman@gmail.com> | 2020-08-31 16:56:16 -0400 |
commit | b2005d4f63110ef876180b7b038b298e100b0e9c (patch) | |
tree | 61a26effa5e61e6b3659209dae7b66d6adb05bc3 | |
parent | 28b904a0a1d8a5d90f128b4487aba047b69bfd70 (diff) |
fixed scrolling of browser when following a link in nested web page that leads to another palce within that web page
-rw-r--r-- | deploy/index.html | 2 | ||||
-rw-r--r-- | src/client/views/MainView.scss | 3 | ||||
-rw-r--r-- | src/client/views/MainView.tsx | 6 | ||||
-rw-r--r-- | src/client/views/collections/CollectionDockingView.tsx | 2 | ||||
-rw-r--r-- | src/mobile/MobileInterface.tsx | 1 |
5 files changed, 5 insertions, 9 deletions
diff --git a/deploy/index.html b/deploy/index.html index b99ca040d..282acc0ce 100644 --- a/deploy/index.html +++ b/deploy/index.html @@ -11,7 +11,7 @@ <body style="display:flex" id="dash-body"> <!-- <script src="https://hypothes.is/embed.js" async></script> --> - <div id="root" style="position:relative;width:100%;height:100%"></div> + <div id="root" style="position:absolute;width:100%;height:100%;overflow: hidden;"></div> <script src="/bundle.js"></script> </body> 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) : <div className={`mainView-libraryFlyout${this._flyoutWidth ? "" : "-out"}`} style={{ minWidth: this._flyoutWidth, width: this._flyoutWidth }} > - <div className="mainView-contentArea"> + <div className="mainView-contentArea" > <DocumentView Document={this._sidebarContent} DataDoc={undefined} @@ -584,7 +584,7 @@ export class MainView extends React.Component { } render() { - return (<div className={"mainView-container" + (this.darkScheme ? "-dark" : "")} ref={this._mainViewRef}> + return (<div className={"mainView-container" + (this.darkScheme ? "-dark" : "")} onScroll={() => document.getElementById("root")!.scrollTop = 0} ref={this._mainViewRef}> {this.inkResources} <DictationOverlay /> <SharingManager /> 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; } |