diff options
| author | bobzel <zzzman@gmail.com> | 2020-08-26 02:30:44 -0400 |
|---|---|---|
| committer | bobzel <zzzman@gmail.com> | 2020-08-26 02:30:44 -0400 |
| commit | 6471ccff7dd145d3725492ccccaecc6035e851f2 (patch) | |
| tree | 0826a9179b16e4d3fbe5925eadc8c738a00c575d /src/client/views/collections/CollectionMenu.tsx | |
| parent | d2e29bc56a8c0bc8bee0d1ceb28726b3caabdb36 (diff) | |
fixed warnings. fixed url / annoation updating when navigating web pages.
Diffstat (limited to 'src/client/views/collections/CollectionMenu.tsx')
| -rw-r--r-- | src/client/views/collections/CollectionMenu.tsx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/client/views/collections/CollectionMenu.tsx b/src/client/views/collections/CollectionMenu.tsx index 2f257d00b..5f40ac59c 100644 --- a/src/client/views/collections/CollectionMenu.tsx +++ b/src/client/views/collections/CollectionMenu.tsx @@ -725,6 +725,8 @@ export class CollectionFreeFormViewChrome extends React.Component<CollectionMenu if (this.selectedDoc) { Doc.GetProto(this.selectedDoc).data = new WebField(value); Doc.SetInPlace(this.selectedDoc, "title", value, true); + const annots = Doc.GetProto(this.selectedDoc)["data-annotations-" + this.urlHash(value)]; + Doc.GetProto(this.selectedDoc)["data-annotations"] = annots instanceof ObjectField ? ObjectField.MakeCopy(annots) : new List<Doc>([]); } } @@ -751,9 +753,7 @@ export class CollectionFreeFormViewChrome extends React.Component<CollectionMenu } future && (future.length = 0); } - Doc.GetProto(selectedDoc).data = new WebField(URLy); - const annots = Doc.GetProto(selectedDoc)["data-annotations-" + this.urlHash(url)]; - Doc.GetProto(selectedDoc)["data-annotations"] = annots instanceof ObjectField ? ObjectField.MakeCopy(annots) : new List<Doc>([]); + this._url = url; } } } catch (e) { |
