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

Drop redundant styles from .grab-to-pan-grab:active #16896

Merged
merged 1 commit into from
Sep 4, 2023

Conversation

Rob--W
Copy link
Member

@Rob--W Rob--W commented Sep 3, 2023

.grab-to-pan-grab:active is #viewerContainer when the mouse is pressed down. It is supposed to have a cursor: grabbing appearance immediately on mousedown,

.grab-to-pan-grabbing is the overlay that is supposed to cover everything, and also has the cursor: grabbing appearance. The "cover everything" result is achieved through position:fixed, inset:0, etc.

The block with these CSS properties for "cover everything" is currently shared by .grab-to-pan-grab:active and .grab-to-pan-grabbing, but only "cursor" need to be shared. The original JS and CSS code at https://github.com/Rob--W/grab-to-pan.js shows that these were supposed to be associated with the overlay only.

The PR that added this to PDF.js also shows that the "cover everything" CSS properties were supposed to be limited to the overlay only: #4209 (diff)

But the final version of the PR mistakenly merged them together. This patch rectifies that mistake.

`.grab-to-pan-grab:active` is `#viewerContainer` when the mouse is
pressed down.  It is supposed to have a `cursor: grabbing` appearance
immediately on mousedown,

`.grab-to-pan-grabbing` is the overlay that is supposed to cover
everything, and also has the `cursor: grabbing` appearance. The "cover
everything" result is achieved through `position:fixed`, `inset:0`, etc.

The block with these CSS properties for "cover everything" is currently
shared by `.grab-to-pan-grab:active` and `.grab-to-pan-grabbing`, but
only "cursor" need to be shared. The original JS and CSS code at
https://github.com/Rob--W/grab-to-pan.js shows that these were supposed
to be associated with the overlay only.

The PR that added this to PDF.js also shows that the "cover everything"
CSS properties were supposed to be limited to the overlay only:
mozilla#4209 (diff)

But the final version of the PR mistakenly merged them together.
This patch rectifies that mistake.
@Snuffleupagus
Copy link
Collaborator

/botio-linux preview

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Linux m4)


Received

Command cmd_preview from @Snuffleupagus received. Current queue size: 0

Live output at: http://54.241.84.105:8877/e7ec5ce9ff3caa4/output.txt

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Linux m4)


Success

Full output at http://54.241.84.105:8877/e7ec5ce9ff3caa4/output.txt

Total script time: 1.46 mins

Published

Copy link
Collaborator

@Snuffleupagus Snuffleupagus left a comment

Choose a reason for hiding this comment

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

r=me, thank you!

@Snuffleupagus Snuffleupagus merged commit b18a166 into mozilla:master Sep 4, 2023
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

When using the hand tool, sometimes the secondary tool bar will go behind the document
3 participants