Skip to content

Commit bd5157c

Browse files
committed
Do not close link preview on click
Instead prevent collision with hovering toolbar by displaying preview above.
1 parent f97466f commit bd5157c

3 files changed

Lines changed: 2 additions & 4 deletions

File tree

entry_types/scrolled/package/src/frontend/Figure.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ export function Figure({
6161
onChange={onCaptionChange}
6262
onlyParagraphs={true}
6363
hyphens="none"
64-
floatingControlsPosition="above"
6564
placeholder={t('pageflow_scrolled.inline_editing.type_text')} />
6665
</figcaption>}
6766
</figure>

entry_types/scrolled/package/src/frontend/inlineEditing/EditableText/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ export const EditableText = React.memo(function EditableText({
6060
value, contentElementId, placeholder, onChange, selectionRect, className,
6161
placeholderClassName, scaleCategory = 'body', typographyVariant, typographySize,
6262
autoFocus,
63-
floatingControlsPosition = 'below'
63+
floatingControlsPosition = 'above'
6464
}) {
6565
const editor = useMemo(
6666
() => withLinks(

entry_types/scrolled/package/src/frontend/inlineEditing/LinkTooltip.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,7 @@ export function LinkPreview({href, openInNewTab, children, className}) {
7878
<span ref={ref}
7979
className={className}
8080
onMouseEnter={() => activate(href, openInNewTab, ref)}
81-
onMouseLeave={deactivate}
82-
onMouseDown={deactivate}>
81+
onMouseLeave={deactivate}>
8382
{children}
8483
</span>
8584
);

0 commit comments

Comments
 (0)