fix: Various collab cursor issues (#2727)
This commit is contained in:
@@ -12,7 +12,6 @@ import ErrorBoundary from "components/ErrorBoundary";
|
|||||||
import Tooltip from "components/Tooltip";
|
import Tooltip from "components/Tooltip";
|
||||||
import useMediaQuery from "hooks/useMediaQuery";
|
import useMediaQuery from "hooks/useMediaQuery";
|
||||||
import useToasts from "hooks/useToasts";
|
import useToasts from "hooks/useToasts";
|
||||||
import { fadeOutCursor } from "styles/animations";
|
|
||||||
import { type Theme } from "types";
|
import { type Theme } from "types";
|
||||||
import { isModKey } from "utils/keyboard";
|
import { isModKey } from "utils/keyboard";
|
||||||
import { uploadFile } from "utils/uploadFile";
|
import { uploadFile } from "utils/uploadFile";
|
||||||
@@ -228,7 +227,8 @@ const StyledEditor = styled(RichMarkdownEditor)`
|
|||||||
visibility: hidden;
|
visibility: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
.heading-name:first-child {
|
.heading-name:first-child,
|
||||||
|
.heading-name:first-child + .ProseMirror-yjs-cursor {
|
||||||
& + h1,
|
& + h1,
|
||||||
& + h2,
|
& + h2,
|
||||||
& + h3,
|
& + h3,
|
||||||
@@ -252,6 +252,10 @@ const StyledEditor = styled(RichMarkdownEditor)`
|
|||||||
}
|
}
|
||||||
|
|
||||||
.ProseMirror {
|
.ProseMirror {
|
||||||
|
& > .ProseMirror-yjs-cursor {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
.ProseMirror-yjs-cursor {
|
.ProseMirror-yjs-cursor {
|
||||||
position: relative;
|
position: relative;
|
||||||
margin-left: -1px;
|
margin-left: -1px;
|
||||||
@@ -260,6 +264,7 @@ const StyledEditor = styled(RichMarkdownEditor)`
|
|||||||
border-right: 1px solid black;
|
border-right: 1px solid black;
|
||||||
height: 1em;
|
height: 1em;
|
||||||
word-break: normal;
|
word-break: normal;
|
||||||
|
|
||||||
&:after {
|
&:after {
|
||||||
content: "";
|
content: "";
|
||||||
display: block;
|
display: block;
|
||||||
@@ -270,7 +275,6 @@ const StyledEditor = styled(RichMarkdownEditor)`
|
|||||||
bottom: 0;
|
bottom: 0;
|
||||||
}
|
}
|
||||||
> div {
|
> div {
|
||||||
animation: ${fadeOutCursor} 2000ms ease-out;
|
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: -1.8em;
|
top: -1.8em;
|
||||||
|
|||||||
@@ -150,7 +150,7 @@
|
|||||||
"react-window": "^1.8.6",
|
"react-window": "^1.8.6",
|
||||||
"reakit": "^1.3.10",
|
"reakit": "^1.3.10",
|
||||||
"regenerator-runtime": "^0.13.7",
|
"regenerator-runtime": "^0.13.7",
|
||||||
"rich-markdown-editor": "^11.18.12",
|
"rich-markdown-editor": "^11.18.17",
|
||||||
"semver": "^7.3.2",
|
"semver": "^7.3.2",
|
||||||
"sequelize": "^6.3.4",
|
"sequelize": "^6.3.4",
|
||||||
"sequelize-cli": "^6.2.0",
|
"sequelize-cli": "^6.2.0",
|
||||||
@@ -221,7 +221,7 @@
|
|||||||
"yarn-deduplicate": "^3.1.0"
|
"yarn-deduplicate": "^3.1.0"
|
||||||
},
|
},
|
||||||
"resolutions": {
|
"resolutions": {
|
||||||
"prosemirror-view": "1.18.1",
|
"prosemirror-view": "1.21.0",
|
||||||
"dot-prop": "^5.2.0",
|
"dot-prop": "^5.2.0",
|
||||||
"js-yaml": "^3.13.1"
|
"js-yaml": "^3.13.1"
|
||||||
},
|
},
|
||||||
|
|||||||
26
yarn.lock
26
yarn.lock
@@ -11765,10 +11765,10 @@ prosemirror-markdown@^1.5.2:
|
|||||||
markdown-it "^10.0.0"
|
markdown-it "^10.0.0"
|
||||||
prosemirror-model "^1.0.0"
|
prosemirror-model "^1.0.0"
|
||||||
|
|
||||||
prosemirror-model@^1.0.0, prosemirror-model@^1.1.0, prosemirror-model@^1.13.3, prosemirror-model@^1.8.1:
|
prosemirror-model@^1.0.0, prosemirror-model@^1.13.3, prosemirror-model@^1.14.3, prosemirror-model@^1.8.1:
|
||||||
version "1.13.3"
|
version "1.15.0"
|
||||||
resolved "https://registry.yarnpkg.com/prosemirror-model/-/prosemirror-model-1.13.3.tgz#3ccfde73b9c9e706933c72bdf7462906509ff1c9"
|
resolved "https://registry.yarnpkg.com/prosemirror-model/-/prosemirror-model-1.15.0.tgz#23bc09098daa7c309dba90a76a1b989ce6f61405"
|
||||||
integrity sha512-wujIYYQEcxdkbKmIJiekVjqtylKxuoEcc+w2PnN7Itc58m/75J4rCUz2dibygVQJFi3gZrD2DNFLjOS6LP4w1g==
|
integrity sha512-hQJv7SnIhlAy9ga3lhPPgaufhvCbQB9tHwscJ9E1H1pPHmN8w5V/lURueoYv9Kc3/bpNWoyHa8r3g//m7N0ChQ==
|
||||||
dependencies:
|
dependencies:
|
||||||
orderedmap "^1.1.0"
|
orderedmap "^1.1.0"
|
||||||
|
|
||||||
@@ -11811,12 +11811,12 @@ prosemirror-utils@^0.9.6:
|
|||||||
resolved "https://registry.yarnpkg.com/prosemirror-utils/-/prosemirror-utils-0.9.6.tgz#3d97bd85897e3b535555867dc95a51399116a973"
|
resolved "https://registry.yarnpkg.com/prosemirror-utils/-/prosemirror-utils-0.9.6.tgz#3d97bd85897e3b535555867dc95a51399116a973"
|
||||||
integrity sha512-UC+j9hQQ1POYfMc5p7UFxBTptRiGPR7Kkmbl3jVvU8VgQbkI89tR/GK+3QYC8n+VvBZrtAoCrJItNhWSxX3slA==
|
integrity sha512-UC+j9hQQ1POYfMc5p7UFxBTptRiGPR7Kkmbl3jVvU8VgQbkI89tR/GK+3QYC8n+VvBZrtAoCrJItNhWSxX3slA==
|
||||||
|
|
||||||
prosemirror-view@1.18.1, prosemirror-view@^1.0.0, prosemirror-view@^1.1.0, prosemirror-view@^1.13.3:
|
prosemirror-view@1.18.1, prosemirror-view@1.21.0, prosemirror-view@^1.0.0, prosemirror-view@^1.1.0, prosemirror-view@^1.13.3:
|
||||||
version "1.18.1"
|
version "1.21.0"
|
||||||
resolved "https://registry.yarnpkg.com/prosemirror-view/-/prosemirror-view-1.18.1.tgz#52ad1c67f51144e27e368bba129142ce87c7791e"
|
resolved "https://registry.yarnpkg.com/prosemirror-view/-/prosemirror-view-1.21.0.tgz#d793cd338eda224026b8fe18a4f3163204963b8b"
|
||||||
integrity sha512-TZd8byDRfdopLiokBY7T27msCSfWqqRxWs/LnBbdI030F+iI2kS+tO59/XFnpZxMLFKlJgOgGGhM9SzD1Nwdxw==
|
integrity sha512-Pjh0vXw/l2Ifc3QcBVKJ/qHej33MX4sdq4/uAVqkSmHLf//bVWTYSZibihMya3lsIxTbDzNl/Z03KrhXWMHaoA==
|
||||||
dependencies:
|
dependencies:
|
||||||
prosemirror-model "^1.1.0"
|
prosemirror-model "^1.14.3"
|
||||||
prosemirror-state "^1.0.0"
|
prosemirror-state "^1.0.0"
|
||||||
prosemirror-transform "^1.1.0"
|
prosemirror-transform "^1.1.0"
|
||||||
|
|
||||||
@@ -12776,10 +12776,10 @@ retry-as-promised@^3.2.0:
|
|||||||
dependencies:
|
dependencies:
|
||||||
any-promise "^1.3.0"
|
any-promise "^1.3.0"
|
||||||
|
|
||||||
rich-markdown-editor@^11.18.12:
|
rich-markdown-editor@^11.18.17:
|
||||||
version "11.18.12"
|
version "11.18.17"
|
||||||
resolved "https://registry.yarnpkg.com/rich-markdown-editor/-/rich-markdown-editor-11.18.12.tgz#389ac35bda688acc1d60e30db36698f93409c5a5"
|
resolved "https://registry.yarnpkg.com/rich-markdown-editor/-/rich-markdown-editor-11.18.17.tgz#bab7f14708e61d4baaf1173892ada06844390a35"
|
||||||
integrity sha512-NWgV1qqV6xu//FE3aQJq7PVlsJH3HxF6B9F2UVgYYBO3AUU/Ld5z6EhbJ5EnTw3/16JG/hc38t1yvmcjd9BypQ==
|
integrity sha512-0NJ08igupcoI/DsxkuivAi9ouKIGzmZdGv2L2W4jz/M0Z8p7SaW4vnTJ1Kk8cT9ryPF/Hvbuimnco5xaqiCCHg==
|
||||||
dependencies:
|
dependencies:
|
||||||
copy-to-clipboard "^3.0.8"
|
copy-to-clipboard "^3.0.8"
|
||||||
fuzzy-search "^3.2.1"
|
fuzzy-search "^3.2.1"
|
||||||
|
|||||||
Reference in New Issue
Block a user