Skip to content

Design View: Add small buffer to click-drag action

What does this MR do?

Previously, mousedown/up events were very sensitive to user clicks in Design View when zoomed in, and a comment form would not be opened when that was the user's intention. This is raised in #214599 (closed)

This MR adds a 2px buffer to click-drag events in Design View: the user must move their mouse 2px from the start position before we initiate the dragging action. In other words, click-and-drag "kicks in" after 2px; anything less and we open the comment form.

How to test

  1. Upload a design
  2. Click on the design (open it in Design View)
  3. Zoom in such that the design overflows (scrollbars appear)
  4. Click on the design to open a comment form - the form should open
  5. Click around a few more times - the comment form should always open (or be visible)
  6. Click-and-drag to move around the zoomed-in image - this should also work as expected

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • [-] Label as security and @ mention @gitlab-com/gl-security/appsec
  • [-] The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • [-] Security reports checked/validated by a reviewer from the AppSec team
Edited by 🤖 GitLab Bot 🤖

Merge request reports