-
Notifications
You must be signed in to change notification settings - Fork 113
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: Don't trigger highlight dialogs while mouse is over another dialog #242
Conversation
pramodsum
commented
Jul 25, 2017
- This also prevents highlight dialogs from triggering while the mouse is over a point dialog
@@ -359,3 +386,8 @@ export function getContext(pageEl, annotationLayerClass, paddingTop, paddingBott | |||
export function getPageEl(annotatedEl, pageNum) { | |||
return annotatedEl.querySelector(`[data-page-number="${pageNum}"]`); | |||
} | |||
|
|||
export function isDialogDatatype(eventTarget) { |
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.
Docs
@@ -598,6 +598,12 @@ class DocAnnotator extends Annotator { | |||
return; | |||
} | |||
|
|||
// Determine if mouse is over any highlight dialog currently | |||
// and ignore hover events of any highlights below | |||
if (docAnnotatorUtil.isDialogDatatype(event.target)) { |
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.
Move out of the for
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.
Tests for isDialogDatatype()
!!
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.
Capitalize the 't' inisDialogDatatype()
isDialogDatatype()
--> isDialogDataType()