Skip to content

Commit

Permalink
Fix empty comment not focused when annotation is clicked
Browse files Browse the repository at this point in the history
  • Loading branch information
mrtcode committed Oct 24, 2024
1 parent 1c29b26 commit d274ce4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/common/reader.js
Original file line number Diff line number Diff line change
Expand Up @@ -1200,8 +1200,8 @@ class Reader {
// unless it is a note (so that one can type after creating it via shortcut, same as with text annotation)
if (!triggeringEvent || triggeringEvent.button !== 2) {
if (triggeredFromView) {
if (['note', 'highlight', 'underline'].includes(annotation.type)
&& !annotation.comment && (!triggeringEvent || annotation.type === 'note')) {
if (['note', 'highlight', 'underline', 'image'].includes(annotation.type)
&& !annotation.comment && (!triggeringEvent || !('key' in triggeringEvent))) {
this._enableAnnotationDeletionFromComment = true;
setTimeout(() => {
let content;
Expand Down

0 comments on commit d274ce4

Please sign in to comment.