@@ -471,7 +471,7 @@ export class Editor extends React.PureComponent<
|
|||||||
try {
|
try {
|
||||||
const element = document.querySelector(hash);
|
const element = document.querySelector(hash);
|
||||||
if (element) {
|
if (element) {
|
||||||
element.scrollIntoView({ behavior: "smooth" });
|
setTimeout(() => element.scrollIntoView({ behavior: "smooth" }), 0);
|
||||||
}
|
}
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
// querySelector will throw an error if the hash begins with a number
|
// querySelector will throw an error if the hash begins with a number
|
||||||
|
|||||||
@@ -456,6 +456,7 @@ class DocumentScene extends React.Component<Props> {
|
|||||||
to={{
|
to={{
|
||||||
pathname: canonicalUrl,
|
pathname: canonicalUrl,
|
||||||
state: this.props.location.state,
|
state: this.props.location.state,
|
||||||
|
hash: this.props.location.hash,
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
|
|||||||
Reference in New Issue
Block a user