Skip to content
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: Pass event to resetHighlightSelection to reset dialog #129

Merged
merged 3 commits into from
Mar 6, 2018

Conversation

pramodsum
Copy link
Contributor

No description provided.

@boxcla
Copy link

boxcla commented Mar 6, 2018

Verified that @pramodsum has signed the CLA. Thanks for the pull request!

@@ -488,7 +488,7 @@ class DocAnnotator extends Annotator {
*/
resetHighlightSelection(event) {
const isCreateDialogVisible = this.createHighlightDialog && this.createHighlightDialog.isVisible;
if (!isCreateDialogVisible || util.isInDialog(event)) {
if (!isCreateDialogVisible || !event || util.isInDialog(event)) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Question about this: Does this mean you can no longer remove highlight selection in a function that isn't triggered by a browser event?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No. There are still one or 2 occasions where the highlight selection is removed without destroying the dialog. This is more for automatically destroying the dialog AND clearing the selection

@pramodsum pramodsum merged commit 89c84d8 into box:master Mar 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants