Skip to content

Commit

Permalink
Expand highlight/underline annotation text on second click
Browse files Browse the repository at this point in the history
  • Loading branch information
mrtcode committed Oct 17, 2023
1 parent 2a1c596 commit 35a5421
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/common/components/sidebar/annotations-view.js
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ const AnnotationsView = memo(React.forwardRef((props, ref) => {
let rect = event.target.closest('.tags').getBoundingClientRect();
return props.onOpenTagsPopup(id, rect.left, rect.top);
}
if (section === 'highlight' && selectedIDsRef.current.length === 1
if (section === 'text' && selectedIDsRef.current.length === 1
&& selectedIDsRef.current[0] === id) {
if (expansionStateRef.current >= 1 && expansionStateRef.current <= 2) {
setExpansionState(2);
Expand Down

0 comments on commit 35a5421

Please sign in to comment.