mirror of
https://github.com/outline/outline.git
synced 2026-11-25 23:24:06 +03:00
fix: Prevent collapsed sidebar opening during text selection (#12965)
This commit is contained in:
1 parent
c7a580fb8c
commit
cdc0316602
2 files changed
+19
-12
No files matched your search
@@ -132,16 +132,23 @@ const Sidebar = React.forwardRef<HTMLDivElement, Props>(function Sidebar_(
|
||||
[width, direction]
|
||||
);
|
||||
|
||||
const handlePointerActivity = React.useCallback(() => {
|
||||
if (ui.sidebarIsClosed) {
|
||||
// clear the timeout when mouse exits
|
||||
if (hoverTimeoutRef.current) {
|
||||
clearTimeout(hoverTimeoutRef.current);
|
||||
const handlePointerActivity = React.useCallback(
|
||||
(event: React.PointerEvent) => {
|
||||
if (ui.sidebarIsClosed) {
|
||||
// don't reveal while a button is held, e.g. selecting text near the edge
|
||||
if (event.buttons !== 0) {
|
||||
return;
|
||||
}
|
||||
// clear the timeout when mouse exits
|
||||
if (hoverTimeoutRef.current) {
|
||||
clearTimeout(hoverTimeoutRef.current);
|
||||
}
|
||||
setHovering(document.hasFocus());
|
||||
setPointerMoved(true);
|
||||
}
|
||||
setHovering(document.hasFocus());
|
||||
setPointerMoved(true);
|
||||
}
|
||||
}, [ui.sidebarIsClosed]);
|
||||
},
|
||||
[ui.sidebarIsClosed]
|
||||
);
|
||||
|
||||
const handlePointerLeave = React.useCallback(
|
||||
(ev) => {
|
||||
|
||||
@@ -1266,8 +1266,6 @@
|
||||
"{{ count }} document imported_other": "{{ count }} document imported",
|
||||
"You can import a zip file that was previously exported from an Outline installation – collections, documents, and images will be imported. In Outline, open <em>Export</em> in the Settings sidebar and click on <em>Export Data</em>.": "You can import a zip file that was previously exported from an Outline installation – collections, documents, and images will be imported. In Outline, open <em>Export</em> in the Settings sidebar and click on <em>Export Data</em>.",
|
||||
"Drag and drop the zip file from the Markdown export option in {{appName}}, or click to upload": "Drag and drop the zip file from the Markdown export option in {{appName}}, or click to upload",
|
||||
"Import a zip file of Markdown documents exported from Slab – collections, posts, and images will be imported. In Slab, open the admin settings and use the <1>Export</1> option to download an archive of your content.": "Import a zip file of Markdown documents exported from Slab – collections, posts, and images will be imported. In Slab, open the admin settings and use the <1>Export</1> option to download an archive of your content.",
|
||||
"Drag and drop the zip file exported from Slab, or click to upload": "Drag and drop the zip file exported from Slab, or click to upload",
|
||||
"Configure": "Configure",
|
||||
"Role": "Role",
|
||||
"Guest": "Guest",
|
||||
@@ -1348,7 +1346,6 @@
|
||||
"Import a JSON data file exported from another {{ appName }} instance": "Import a JSON data file exported from another {{ appName }} instance",
|
||||
"Import pages from a Confluence instance": "Import pages from a Confluence instance",
|
||||
"Enterprise": "Enterprise",
|
||||
"Import a zip file of Markdown documents exported from Slab": "Import a zip file of Markdown documents exported from Slab",
|
||||
"Quickly transfer your existing documents, pages, and files from other tools and services into {{appName}}. You can also drag and drop any HTML, Markdown, and text documents directly into Collections in the app.": "Quickly transfer your existing documents, pages, and files from other tools and services into {{appName}}. You can also drag and drop any HTML, Markdown, and text documents directly into Collections in the app.",
|
||||
"Recent imports": "Recent imports",
|
||||
"Configure a variety of integrations with third-party services.": "Configure a variety of integrations with third-party services.",
|
||||
@@ -1616,6 +1613,9 @@
|
||||
"You can manage your passkeys at any time": "You can manage your passkeys at any time",
|
||||
"If you have any concerns about your account security, please contact a workspace admin.": "If you have any concerns about your account security, please contact a workspace admin.",
|
||||
"Manage Passkeys": "Manage Passkeys",
|
||||
"Import a zip file of Markdown documents exported from Slab – collections, posts, and images will be imported. In Slab, open the admin settings and use the <1>Export</1> option to download an archive of your content.": "Import a zip file of Markdown documents exported from Slab – collections, posts, and images will be imported. In Slab, open the admin settings and use the <1>Export</1> option to download an archive of your content.",
|
||||
"Drag and drop the zip file exported from Slab, or click to upload": "Drag and drop the zip file exported from Slab, or click to upload",
|
||||
"Import a zip file of Markdown documents exported from Slab": "Import a zip file of Markdown documents exported from Slab",
|
||||
"Add to Slack": "Add to Slack",
|
||||
"document published": "document published",
|
||||
"document updated": "document updated",
|
||||
|
||||
Reference in new issue
Block a user