Skip to content

Commit

Permalink
fix: tag suggestions positioning (usememos#2151)
Browse files Browse the repository at this point in the history
  • Loading branch information
maciej-ka authored Aug 18, 2023
1 parent 3f82729 commit 735cfda
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
4 changes: 2 additions & 2 deletions web/src/components/MemoEditor/Editor/TagSuggestions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,8 @@ const TagSuggestions = ({ editorRef, editorActions }: Props) => {
if (!isVisibleRef.current || !position) return null;
return (
<div
className="z-2 p-1 absolute max-w-[12rem] rounded font-mono shadow bg-zinc-200 dark:bg-zinc-600"
style={{ left: position.left - 6, top: position.top + position.height + 2 }}
className="tag-suggestions z-20 p-1 absolute max-w-[12rem] rounded font-mono shadow bg-zinc-200 dark:bg-zinc-600"
style={{ left: position.left, top: position.top + position.height }}
>
{suggestionsRef.current.map((tag, i) => (
<div
Expand Down
10 changes: 10 additions & 0 deletions web/src/less/memo-editor.less
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@
}
}

.tag-suggestions {
margin-left: 6px;
margin-top: 18px;
}

.tag-action > .tag-list {
@apply bottom-7;
top: unset !important;
Expand All @@ -22,6 +27,11 @@
}
}

.tag-suggestions {
margin-left: -10px;
margin-top: 2px;
}

> .memo-editor {
@apply mt-4 flex flex-col justify-start items-start relative w-full h-auto bg-inherit dark:text-gray-200;
}
Expand Down

0 comments on commit 735cfda

Please sign in to comment.