fleig
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Lightbox images pinch zoom on mobileHi! For some reason, two replies to this thread are not showing up here, but I received them in my email address. Thanks to @tousif00 and @adrienblake530, I managed to do mess around with the JS on the view.min.js file, on the block-library/image folder (via chrome dev tools). On line 156, by commenting the function handleTouchMove, I can pinch zoom on the opened lightbox images, which is what I want — but now I can also scroll the page with the image open, which is a bit fucky.
I only tested this on desktop, simulating a pinch zoom using shift+drag, but it’ll probably work on mobile. I still haven’t figured out how to apply this modified js to my function, but it’s probably not too hard.
Finally, my question is: is this zoom behavior with image open something that might eventually be fixed in the future, or will we have to deal with custom code/plugins forever? On mobile, pinching to zoom in on images is, in my opinion, something that users expect when they want to inspect something up close.
Forum: Fixing WordPress
In reply to: Lightbox images pinch zoom on mobileThanks for the reply! What viewport size are you using? I’m using 360px as the base width for the mobile version of the interface, and I’m not getting any horizontal scrolling (neither on my pc or on my actual android phone). The mobile interface is not 100% done, but I’m really not getting any of the issues you described (even the left sidebar actually gets moved below the content). I tried applying the lightbox on an image in a much simples page (https://paulolachenmayer.org/autobiografia/) and I still can’t pinch-zoom on the image after opening it in the lightbox on mobile. I even tried to find another instance of the native lightbox being used online (I think this is native: https://aronhack.com/enable-wordpress-native-image-lightbox-and-apply-to-all-existing-images/), but it’s the same thing, I can’t zoom in on the page after opening the image.
Forum: Fixing WordPress
In reply to: Lightbox images pinch zoom on mobileOh, of course! I’m using the native lightbox solution on Gutenberg, here’s an example: https://paulolachenmayer.org/brasao/dom-frei-domingos-da-transfiguracao-machado-o-s-b/