diff options
author | bobzel <zzzman@gmail.com> | 2021-03-15 21:41:04 -0400 |
---|---|---|
committer | bobzel <zzzman@gmail.com> | 2021-03-15 21:41:04 -0400 |
commit | db76556dd1f5c8e6c04a388f5b0f6a46f223efce (patch) | |
tree | 9d4c53f073bd3cd64dc6fa32654eb47f2e746389 /src/client/views/nodes/DocumentView.tsx | |
parent | f9db6aa1059c6034adb41bc25f932ec5749e6aea (diff) |
final cleanups to get scrolling to work smoothly for webbox's - sadly, does not work as well in Firefox, and even worse in Safari.
Diffstat (limited to 'src/client/views/nodes/DocumentView.tsx')
-rw-r--r-- | src/client/views/nodes/DocumentView.tsx | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/client/views/nodes/DocumentView.tsx b/src/client/views/nodes/DocumentView.tsx index 8dea34a15..aec6cd03d 100644 --- a/src/client/views/nodes/DocumentView.tsx +++ b/src/client/views/nodes/DocumentView.tsx @@ -479,7 +479,10 @@ export class DocumentViewInternal extends DocComponent<DocumentViewInternalProps if ((this.layoutDoc.onDragStart || this.props.Document.rootDocument) && !(e.ctrlKey || e.button > 0)) { // onDragStart implies a button doc that we don't want to select when clicking. RootDocument & isTemplaetForField implies we're clicking on part of a template instance and we want to select the whole template, not the part stopPropagate = false; // don't stop propagation for field templates -- want the selection to propagate up to the root document of the template } else { - this.props.select(e.ctrlKey || e.shiftKey); + const ctrlPressed = e.ctrlKey || e.shiftKey; + if (this.props.Document.type === DocumentType.WEB) { + this._timeout = setTimeout(() => { this._timeout = undefined; this.props.select(ctrlPressed); }, 350); + } else this.props.select(ctrlPressed); } preventDefault = false; } |