fix: Link editor should reset when selection changes

closes #3362
This commit is contained in:
Tom Moor
2022-04-13 08:55:43 -07:00
parent d3ecab3489
commit f23f0d57de
2 changed files with 2 additions and 0 deletions

View File

@@ -137,6 +137,7 @@ export default class LinkToolbar extends React.Component<Props> {
<FloatingToolbar ref={this.menuRef} active={active} {...rest}>
{active && (
<LinkEditor
key={`${selection.from}-${selection.to}`}
from={selection.from}
to={selection.to}
onCreateLink={onCreateLink ? this.handleOnCreateLink : undefined}

View File

@@ -243,6 +243,7 @@ export default class SelectionToolbar extends React.Component<Props> {
>
{link && range ? (
<LinkEditor
key={`${range.from}-${range.to}`}
dictionary={dictionary}
mark={range.mark}
from={range.from}