fix: sticky searchbar hidden in codemirror (#3351)

* fix: sticky search bar in codemirror

* chore: use tailwind classes

* chore: improve consistency across editor instances

---------

Co-authored-by: Liyas Thomas <liyascthomas@gmail.com>
This commit is contained in:
Nivedin
2023-09-18 12:45:14 +05:30
committed by GitHub
parent 8b0ba3a45e
commit 3684d25848
22 changed files with 172 additions and 23 deletions

View File

@@ -219,8 +219,8 @@ export function useCodemirror(
function handleTextSelection() {
const selection = view.value?.state.selection.main
if (selection) {
const from = selection.from
const to = selection.to
const { from, to } = selection
if (from === to) return
const text = view.value?.state.doc.sliceString(from, to)
const { top, left } = view.value?.coordsAtPos(from)
if (text) {