-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix: Highlight selection on Surface #326
Conversation
- Do not reset highlight selection on 'selectionchange' event on touch enabled devices when the user is creating a highlight annotation
Verified that @pramodsum has signed the CLA. Thanks for the pull request! |
|
||
// Do nothing if in a text area or mobile dialog or mobile create dialog is already open | ||
const pointController = this.modeControllers[TYPES.point]; | ||
const isCreatingPoint = !!(pointController && pointController.pendingThreadID); | ||
const isPopoverActive = !!util.findClosestElWithClass(document.activeElement, CLASS_ANNOTATION_POPOVER); | ||
if (this.isCreatingHighlight || isCreatingPoint || isPopoverActive) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should re-show the create dialog on selection change so that the position updates
@@ -577,7 +579,7 @@ class DocAnnotator extends Annotator { | |||
} | |||
|
|||
this.selectionEndTimeout = setTimeout(() => { | |||
if (this.createHighlightDialog && !this.createHighlightDialog.isVisible) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ensures create dialog is re-positioned on timeout
https://github.com/box/box-annotations/releases/tag/v3.7.1 * Update Translations (box#328) ([39805b8](box/box-annotations@39805b8)), closes [box#328](box/box-annotations#328) * Chore: Add escape hotkey on AnnotationPopover (box#327) ([e92ec85](box/box-annotations@e92ec85)), closes [box#327](box/box-annotations#327) * Fix: Highlight selection on Surface (box#326) ([6a3b83a](box/box-annotations@6a3b83a)), closes [box#326](box/box-annotations#326) * Fix: Import correct styling for flyout component (box#325) ([14d65f6](box/box-annotations@14d65f6)), closes [box#325](box/box-annotations#325)
Only reset highlight selection on
selectionchange
event on touch enabled devices when the user is NOT creating a highlight annotationtests