From 0f560a9032076d1ed096740e04a54d484ee0aaf6 Mon Sep 17 00:00:00 2001 From: bobzel Date: Wed, 10 Feb 2021 16:06:53 -0500 Subject: fixes for stacking views to allow new text to be entered properly without losing focus. fixed document decorations for stacking views. fixed lightboxView criteria for going to an existing view in a lightbox instad of creating a new one. --- src/client/views/nodes/formattedText/FormattedTextBox.scss | 1 + 1 file changed, 1 insertion(+) (limited to 'src/client/views/nodes/formattedText/FormattedTextBox.scss') diff --git a/src/client/views/nodes/formattedText/FormattedTextBox.scss b/src/client/views/nodes/formattedText/FormattedTextBox.scss index 81bca4c00..33425ba15 100644 --- a/src/client/views/nodes/formattedText/FormattedTextBox.scss +++ b/src/client/views/nodes/formattedText/FormattedTextBox.scss @@ -389,6 +389,7 @@ footnote::after { overflow-x: hidden; color: initial; max-height: 100%; + width: 100%; display: flex; flex-direction: row; transition: opacity 1s; -- cgit v1.2.3-70-g09d2 From 01081a8d2064127bfeccbd52dfaae10728123b9f Mon Sep 17 00:00:00 2001 From: bobzel Date: Wed, 10 Feb 2021 17:10:23 -0500 Subject: fixed escaping menu to not close lightbox. fixed formattedTextBox dragging of sidebar to not scroll. fixed css width of formattedTextBox text area --- src/client/views/GlobalKeyHandler.ts | 6 ++++-- src/client/views/MainView.tsx | 2 +- src/client/views/nodes/formattedText/FormattedTextBox.scss | 1 + src/client/views/nodes/formattedText/FormattedTextBox.tsx | 1 + 4 files changed, 7 insertions(+), 3 deletions(-) (limited to 'src/client/views/nodes/formattedText/FormattedTextBox.scss') diff --git a/src/client/views/GlobalKeyHandler.ts b/src/client/views/GlobalKeyHandler.ts index e70dea0f6..09b95315c 100644 --- a/src/client/views/GlobalKeyHandler.ts +++ b/src/client/views/GlobalKeyHandler.ts @@ -115,7 +115,6 @@ export class KeyManager { DocumentLinksButton.StartLink = undefined; DocumentLinksButton.StartLinkView = undefined; InkStrokeProperties.Instance && (InkStrokeProperties.Instance._controlBtn = false); - LightboxView.LightboxDoc = undefined; Doc.SetSelectedTool(InkTool.None); var doDeselect = true; @@ -129,7 +128,10 @@ export class KeyManager { } else { doDeselect = !ContextMenu.Instance.closeMenu(); } - doDeselect && SelectionManager.DeselectAll(); + if (doDeselect) { + SelectionManager.DeselectAll(); + LightboxView.LightboxDoc = undefined; + } DictationManager.Controls.stop(); GoogleAuthenticationManager.Instance.cancel(); SharingManager.Instance.close(); diff --git a/src/client/views/MainView.tsx b/src/client/views/MainView.tsx index 4c164b85b..ca07fa879 100644 --- a/src/client/views/MainView.tsx +++ b/src/client/views/MainView.tsx @@ -640,7 +640,7 @@ export class MainView extends React.Component { {this.snapLines}
- +
); } diff --git a/src/client/views/nodes/formattedText/FormattedTextBox.scss b/src/client/views/nodes/formattedText/FormattedTextBox.scss index 33425ba15..0f2f9cdb7 100644 --- a/src/client/views/nodes/formattedText/FormattedTextBox.scss +++ b/src/client/views/nodes/formattedText/FormattedTextBox.scss @@ -41,6 +41,7 @@ audiotag:hover { display: flex; flex-direction: row; transition: opacity 1s; + width: 100%; .formattedTextBox-dictation { height: 12px; diff --git a/src/client/views/nodes/formattedText/FormattedTextBox.tsx b/src/client/views/nodes/formattedText/FormattedTextBox.tsx index d608cc5df..81e385e95 100644 --- a/src/client/views/nodes/formattedText/FormattedTextBox.tsx +++ b/src/client/views/nodes/formattedText/FormattedTextBox.tsx @@ -614,6 +614,7 @@ export class FormattedTextBox extends ViewBoxAnnotatableComponent<(FieldViewProp const bounds = this.CurrentDiv.getBoundingClientRect(); this.layoutDoc._sidebarWidthPercent = "" + 100 * Math.max(0, (1 - (e.clientX - bounds.left) / bounds.width)) + "%"; this.layoutDoc._showSidebar = this.layoutDoc._sidebarWidthPercent !== "0%"; + e.preventDefault(); return false; } @undoBatch -- cgit v1.2.3-70-g09d2