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(annotations): Fix annotation region in mobile #1521

Merged
merged 3 commits into from
May 30, 2024

Conversation

marcoartaviaq
Copy link
Contributor

@marcoartaviaq marcoartaviaq commented May 29, 2024

Fix the creation of annotation regions when enableAnnotationsDiscoverability is set to false. When enableAnnotationsDiscoverability is true, the class bp-annotations-discoverable is added. This class sets pointer-events: none on the.textLayerelement (see source) to prevent the text layer from intercepting pointer events intended for the region creator. This PR introduces pointer-events: none to the .textLayer element when the region creation button is enabled (this causes the class bp-annotations-create--region to be added), allowing users to comment by region even when discoverability is disabled.

Behavior before the update:

region-annotations-before.mp4

Behavior after the update:

region-annotations-safari-mobile.mp4

Behavior in other non mobile browsers:

Firefox:

region-annotations-firefox.mp4

Chrome:

region-annotations-chrome.mp4

Safari:

region-annotations-safari.mp4

Edge:

region-annotations-edge.mp4

@marcoartaviaq marcoartaviaq requested a review from a team as a code owner May 29, 2024 16:20
bfoxx1906
bfoxx1906 previously approved these changes May 29, 2024
Copy link
Contributor

@bfoxx1906 bfoxx1906 left a comment

Choose a reason for hiding this comment

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

Fix makes sense. Approving. Let's just make sure that we do regression testing for annotation creation on the other browsers in a non-mobile context as well.

As hovering over text spans while on region creation mode disallow region creation
@marcoartaviaq marcoartaviaq removed the request for review from bfoxx1906 May 30, 2024 18:31
@mergify mergify bot merged commit d281190 into box:master May 30, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants