aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/collections/CollectionSubView.tsx
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2020-10-18 21:41:31 -0400
committerbobzel <zzzman@gmail.com>2020-10-18 21:41:31 -0400
commitd489ed1071b989ffee1b476d15d36fb2dfb5797a (patch)
tree073ad21d5274c252771e0cbaa9f44666e53077eb /src/client/views/collections/CollectionSubView.tsx
parent37fc6beb4662be195b8aa551cc1042b04f2c24a8 (diff)
resets scrollTop when navigating to a new webpage in WebBox. set url on proto's data field when creating a webPage, not delegate.
Diffstat (limited to 'src/client/views/collections/CollectionSubView.tsx')
-rw-r--r--src/client/views/collections/CollectionSubView.tsx3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/client/views/collections/CollectionSubView.tsx b/src/client/views/collections/CollectionSubView.tsx
index f3e563422..f0cf54db4 100644
--- a/src/client/views/collections/CollectionSubView.tsx
+++ b/src/client/views/collections/CollectionSubView.tsx
@@ -406,7 +406,7 @@ export function CollectionSubView<T, X>(schemaCtor: (doc: Doc) => T, moreProps?:
this.addDocument(alias);
} else {
console.log("Adding ...");
- const newDoc = Docs.Create.WebDocument(uriList, {
+ const newDoc = Docs.Create.WebDocument(uriList.split("#annotations:")[0], {// clean hypothes.is URLs that reference a specific annotation (eg. https://en.wikipedia.org/wiki/Cartoon#annotations:t7qAeNbCEeqfG5972KR2Ig)
...options,
_fitWidth: true,
title: uriList.split("#annotations:")[0],
@@ -416,7 +416,6 @@ export function CollectionSubView<T, X>(schemaCtor: (doc: Doc) => T, moreProps?:
useCors: true
});
console.log(" ... " + newDoc.title);
- newDoc.data = new WebField(uriList.split("#annotations:")[0]); // clean hypothes.is URLs that reference a specific annotation (eg. https://en.wikipedia.org/wiki/Cartoon#annotations:t7qAeNbCEeqfG5972KR2Ig)
console.log(" ... " + this.addDocument(newDoc) + " " + newDoc.title);
}
return;