jsPanel4
jsPanel4 copied to clipboard
Strange behaviour after pinch/zoom Gesture on Window titlebar
If you do a pinch/zoom Gesture on the Titlebar of a open jsPanel Window and click afterwards anywhere on the free area around the window it will change its position.
To Reproduce
- Open the jspanel Website in a Browser on a Touch Device
- Wait for the demo window to open
- Do a pinch/zoom Gesture on the Titlebar of the window
- Click anywhere in the free space around the window
- The window will change its position to the point of the click.
See this video demo: https://sigmatek-my.sharepoint.com/:v:/g/personal/alexander_knett_sigmatek_at/ESwHFDg3vJZMojegNPld-rUBdCaQ5X0BcmSAVrVYynaPhQ?e=aHXQIo
Expected behavior The window should not change its position.
Devices used:
- Galaxy Tab S7+, Thinkpad T470s with Touch, Linux Desktop Device with Touchscreen
- Android 12 Chrome 103.x / Windows 10 + Chrome 103.x / Debian Linux + Chrome 80.x /
@akstek Thanks for the report ... I could reproduce the issue. Well, jsPanel does not support any multi-touch gestures whatsoever. And it doesn't include any code that tries to handle inadvertent multi-touch actions. I guess the issue is related to that facts.
I'm sorry, but this most probably will not change, at least not within v4.x of jsPanel.
Regards, Stefan
Doing a Pinch/Zoom Gesture on a mobile is a common task.
The bad thing about this bug is that the user has to reload the page to get rid of it.
I narrowed it down that there is a mousemove handler bound to the document, which never gets removed on touchend/mouseup.
Well, you might be right. And I know that my jsPanel code has flaws. But please consider that I'm NOT a professional/trained programmer, and therefore, my skills as programmer are limited. jsPanel is sort of a hobby I do in my spare time. If I ever start a version 5 a few things will most probably be done differently ... and hopefully better. But for now ... it's the best I can do.
Furthermore, as someone doing this in his sparetime and providing jsPanel for free I don't have a huge assortment of devices to test on (especially devices with a touchscreen).
I hope you can understand me reasoning.
PS: If you can track it down to a specific handler ... maybe you can also provide a fix. So far I thought all handlers concerning the dragit/resizeit features are removed on mouseup/touchend/pointerup.
Hello Stefan I'm not trying only to flatter you in this letter .
I have been a programmer all my life and have 40 years of experience in development , I am professionally valued in my workplaces, with great professional pride.
You are a better programmer than me on several levels in the field you are familiar with, Client side web development and knowledge of javascript css and more.
Over the years I have learned a lot from you, and I have received great professional help from you that has improved my projects that I am so proud of.
And like me, over the years quite a few people have been helped by and your excellent professionalism.
A programmer does not have to study in school to be a valued and high-level professional
programmer can be an excellent programmer with as much common sense and experience and self-learning ability as you have.
Stefan I declare that you are an excellent programmer that many would like the ability you demonstrate
Yours always in friendship Hefner Avi
@AviHafner Hi Avi my friend, Thank you so much for your extremely friendly words, I really do appriciate it😄
My very best regards, Stefan
@Flyer53 I tired to fix this. But I don't know if this affects other areas. https://github.com/Flyer53/jsPanel4/compare/master...akstek:jsPanel4:Pinch_Zoom_Fix
And THX for your hard work, jsPanel is a great pice of software.
@akstek Thanks for your effort. I'm currently out of town for about two weeks. I'll check it as soon as I'm back home.
@Flyer53 Any updates on this?
@akstek Sorry, there are no news on this. And due to some urgent family issues I currently neither have the time nor the necessary peace to do any substantial work on jsPanel. So this will have to wait and I can't say when I'll be able start some more work...
OK, wish you all the best. In the meantime we will use our patched version.