Merge pull request #24 from log-li/fix/markdown-editor-selection-insert
fix: enable selection-to-conversation popup in the markdown editor
This commit is contained in:
1 file changed
+2
-2
@@ -141,11 +141,11 @@ export function TextEditor(props: FileViewerProps) {
|
|||||||
...defaultKeymap,
|
...defaultKeymap,
|
||||||
...historyKeymap,
|
...historyKeymap,
|
||||||
]),
|
]),
|
||||||
// Selection popup (the catch-all code viewer only): a non-empty
|
// Selection popup (the code and markdown editors): a non-empty
|
||||||
// selection anchors the floating "add to conversation" button above
|
// selection anchors the floating "add to conversation" button above
|
||||||
// its head. Scrolling (geometry/viewport change) or losing focus
|
// its head. Scrolling (geometry/viewport change) or losing focus
|
||||||
// hides it; typing collapses the selection and hides it too.
|
// hides it; typing collapses the selection and hides it too.
|
||||||
...(viewerId === 'code' ? [
|
...(viewerId === 'code' || viewerId === 'markdown' ? [
|
||||||
CodeMirrorView.updateListener.of((update) => {
|
CodeMirrorView.updateListener.of((update) => {
|
||||||
if (update.geometryChanged || update.viewportChanged) {
|
if (update.geometryChanged || update.viewportChanged) {
|
||||||
hidePopup()
|
hidePopup()
|
||||||
|
|||||||
Reference in new issue
Block a user