fix: Fixed issue where opening a Super note would change its modified date (skip e2e)
This commit is contained in:
@@ -27,12 +27,6 @@ export const SearchPlugin = () => {
|
|||||||
const isCaseSensitiveRef = useStateRef(isCaseSensitive)
|
const isCaseSensitiveRef = useStateRef(isCaseSensitive)
|
||||||
const resultsRef = useStateRef(results)
|
const resultsRef = useStateRef(results)
|
||||||
|
|
||||||
useEffect(() => {
|
|
||||||
if (!isSearchActive) {
|
|
||||||
editor.focus()
|
|
||||||
}
|
|
||||||
}, [editor, isSearchActive])
|
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const isFocusInEditor = () => {
|
const isFocusInEditor = () => {
|
||||||
if (!document.activeElement || !document.activeElement.closest('.blocks-editor')) {
|
if (!document.activeElement || !document.activeElement.closest('.blocks-editor')) {
|
||||||
@@ -51,6 +45,7 @@ export const SearchPlugin = () => {
|
|||||||
event.preventDefault()
|
event.preventDefault()
|
||||||
event.stopPropagation()
|
event.stopPropagation()
|
||||||
dispatch({ type: 'toggle-search' })
|
dispatch({ type: 'toggle-search' })
|
||||||
|
editor.focus()
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user