-
Notifications
You must be signed in to change notification settings - Fork 10k
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
Removed .grab-to-pan-grab:active to resolve toolbars going behind canvas issue (issue 5452) #16884
Removed .grab-to-pan-grab:active to resolve toolbars going behind canvas issue (issue 5452) #16884
Conversation
Why not just decrease the value for the HandTool-classes a little bit instead, e.g. to Line 1376 in 92f7653
That comment probably ought to be updated to something like the following now. /* Should be higher than anything else in the `#viewerContainer`. */
Please keep in mind that Firefox is the primary development target, hence that's the browser that you should do most testing in. |
03e7420
to
00676df
Compare
@Snuffleupagus as per ur suggestion Ive amended my commit to reduce the hand z-index value to 29000 and updated the comment next to it accordingly. Ive tested it again on Firefox, Chrome and Brave and the new fix holds up. Let me know if I have missed anything. |
00676df
to
ba0ecb8
Compare
Please re-format the commit message to something like the following (since the first line should be a summary of the changes):
|
ba0ecb8
to
28a0291
Compare
@Snuffleupagus reformatted the commit message to your given specifications. |
Some quick testing shows that this patch leads to another kind of graphical glitch, and while that one may be less annoying than the current behaviour it's still not perfect; so there's apparently a reason for the existing (high) Steps to reproduce:
Expected behaviour: Actual behaviour: |
I dont think marking this as a WONTFIX for a harmless glitch like that is a good idea. Ill try to find a fix for it. |
28a0291
to
a831387
Compare
@Snuffleupagus I found that the issue was happening cuz both the viewerContainer and the .grab-to-pan-grabbing div were being moved to z-index 50k. When I isolated the z-index move to just .grab-to-pan-grabbing it seemed to fix the issue. I tested it on Chrome, Brave and Firefox and it seems to be resolved now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When I isolated the z-index move to just .grab-to-pan-grabbing it seemed to fix the issue.
The "seemed to fix"-part makes me worried about what might break with these changes, since you've not really explained why the .grab-to-pan-grab:active,
rule doesn't need a z-index
set.
@Snuffleupagus Apologies for that, so from what Ive understood the .grab-to-pan-grab:active rule is supposed to activate when we click and drag on the pdf content with the hand tool. However, when we click and drag, the .grab-to-pan-grabbing rule becomes the div that is overlaying the entire document. The code for the actual movement is done by manipulating the vertical and horizontal scroll bars. In fact, on testing further I havent seen the css rules in the .grab-to-pan-grab:active rule be applied at all when clicking and dragging with the hand tool. So based on that, I havent detected any need for the grab-to-pan-grab:active rule at all. In fact, when i removed it and just kept all that css in grab-to-pan-grabbing alone, the hand movement still worked fine. I tested it just now in Chrome, Brave and Firefox and have not detected any issues at all. (In the image below i removed the .grab-to-pan-grab:active rule.) |
…vas issue (issue 5452). While my fix was targeted toward the secondaryToolbar, I noticed that the issue regarding the toolbars going behind the canvas on using the hand tool persisted for the findToolbar as well. This was because the viewerContainer div had alot of unnecessary styling applied to it via .grab-to-pan-grab:active. On applying those rules to .grab-to-pan-grabbing alone the issue was resolved. I tested the fix extensively in Chrome, Firefox and Brave with no issues seen.
a831387
to
8ffd46e
Compare
From: Bot.io (Linux m4)ReceivedCommand cmd_preview from @Snuffleupagus received. Current queue size: 0 Live output at: http://54.241.84.105:8877/c53a7062ed6eef6/output.txt |
From: Bot.io (Linux m4)SuccessFull output at http://54.241.84.105:8877/c53a7062ed6eef6/output.txt Total script time: 1.52 mins Published |
I'll take a closer look within 2 weeks. |
The purpose of the Once the mouse has been moved, the browser will compute the appearance based on the overlay that is now under the cursor ( PDF.js's viewer.css has more CSS properties beyond the Earlier versions of this PR tried to tweak the |
Removed .grab-to-pan-grab:active to resolve toolbars going behind canvas issue (issue 5452).
While my fix was targeted toward the secondaryToolbar, I noticed that the issue regarding the toolbars going behind the canvas on using the hand tool persisted for the findToolbar as well. This was because the viewerContainer div had alot of unnecessary styling applied to it via .grab-to-pan-grab:active. On applying those rules to .grab-to-pan-grabbing alone the issue was resolved.
I tested the fix extensively in Chrome, Firefox and Brave with no issues seen.
This is a fix for #5452