-
-
Notifications
You must be signed in to change notification settings - Fork 144
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
Package tabs
: disable view if clientX or clientY is negative
#1179
base: updated-latest-electron
Are you sure you want to change the base?
Package tabs
: disable view if clientX or clientY is negative
#1179
Conversation
Can you consistently reproduce the scenario where |
I had modify The video of my test is uploaded to yt: https://youtu.be/SP7BTbnyr98 I want to notice the pdf-viewer pacakge works fine on Pulsar, because it never reported negative values of clientX or clientY. |
I have done more tests. In Pulsar 1.124.0 bugs appear too 🙁, but after |
@asiloisad Thanks for the video! That's helpful. The initial issue is clear: Late in the video, it seems like the error is triggered when you drop the tab back in its existing pane container. Do I have that right? The first time it happens is around the 2:00 mark in the video. It's weird because it seems like Anyway, I'm just curious. I might apply this fix in a slightly different way, but I'll make sure it lands. Thanks! |
@asiloisad, I think 78be47c might fix this. My thinking is that we just have to prevent the exception here — that way I pushed that commit to |
You are right. At 1:59 there is second case which lead to negative There is one more pdf package based on pdf.js in pulsar repository. It has the same problem as my package... :( Your fix works fine as well. Thank you! I will work more with pdf.js in future to improve my package. |
I'll reopen this because we ought to backport the fix to the stable release. I'll close it again once that lands. |
I'm the author of the pdf-viewer package. After switching to PulsarNext a strange exception appears.
Steps to reproduce:
I have been investigating this a bit and have discovered something strange. Sometimes
clientX
andclientY
of the drag event are negative, sodocument.elementFromPoint
cannot find an element and returns undefined. In Pulsar (old) I never noticed this and the above statement does not throw an exception. Suggested solution has solved the problem, but I'm not sure if it's optimal. Perhaps a better solution would be to diagnose and solve the problem of why clientX and clientY take negative values.