NightLancer / PixivPreview

Showing an enlarged preview of arts/manga, highlighting followed users, providing history better then premium on pixiv
https://www.pixiv.net/
MIT License
29 stars 3 forks source link

click-to-preview shows image outside browser window, not centered #16

Closed Chad90b closed 2 years ago

Chad90b commented 3 years ago

when using click-to-preview the preview box often is not centered and renders outside of the browser window. this makes it hard and sometimes impossible to see the preview. this is often fixed by clicking the preview a few times or refreshing the page. this seems to happen to all images (single image only, not multi image preview) but the problem where it disappears outside of screen only happens on the right-most image. the middle and left images still have the issue but at least the preview is visible.

edit: i just noticed this odd behavior also happens with multi-image previews

example recording attached showing that first click the preview is outside the browser window but the next click it is back inside the browser and shifted to the left so it is not overflowing the window:

https://user-images.githubusercontent.com/68355086/136639059-4431c811-1d42-402d-a871-364986730052.mp4

NightLancer commented 3 years ago

@Chad90b Hello, thank you for reporting. I suppose this bug was occurring only on the search page? If so, recently I noticed this as well while developing enhanced history, and already have fix for it. I'll apply it in few minutes and wait for you to confirm it is fixed.

NightLancer commented 2 years ago

Considering as closed.

Chad90b commented 2 years ago

hi @NightLancer sorry for late reply but the problem does not seem fixed. it seems to happen with all that have more than 1 image now. every single multi-image thumb i hovered in the right side showed most of the preview outside the screen.

but it seems ok for the single image ones!

NightLancer commented 2 years ago

@Chad90b Hmm. Can you share your other script settings, extension manager and browser version so I can reproduce the bug? And write your screen resolution(just in case).

UPD: And does this but appearing on the specific pages or every single one?(and same question for pre-2.53.5 version).

UPD2: Managed to reproduce a bug, so information mentioned above may be not so needed. I just usually open pixiv from "Newest works: Following" and moving from there to any "new-styled" page counts as "reload", but in case on navigating only among new pages the bug occurs. Looking for cause rn.

NightLancer commented 2 years ago

@Chad90b released current version of the script I have that works for me, specifically tested it several times with previous version on github to ensure bug is 100% present on old version and no longer occurs on the new one.

This time I will wait for you confirmation (but apparently will close it somewhen). Anyway thank you for the feedback, currently I'm looking more for code improvements and developing some new features and not actively using pixiv.

Chad90b commented 2 years ago

@NightLancer ah excellent. that seems to have worked really well! thank you very much

sorry for being late with responding. i have quite a big backlog of projects to work on these days.

i understand and wish you luck with your code!

NightLancer commented 2 years ago

@Chad90b It's okay, glad it works now. Thanks!