You are not logged in.

Dear visitor, welcome to krpano.com Forum. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

1

Tuesday, November 6th 2018, 8:39pm

Chrome 70.0.3538.77 breaks KRPano touch functionality

We just noticed that the touch functionality has stopped working on all of our KRPano sites in Chrome 70.0.3538.77. KRpano 1.19-pr16
Other browsers are fine.

Edit: Just tested Chrome Beta version 71.0.3578.30 - same issues. This is on a desktop, a Surface Studio Pro, Windows 10
Edit2: The issue seems to be mostly related to touch-dragging to look around the pano. Touch functions still seem to "sort-of" work for interface buttons although its buggy.

This post has been edited 4 times, last edit by "bhh" (Nov 6th 2018, 9:44pm)


2

Tuesday, November 6th 2018, 11:12pm

Hi,

this is the reason:
https://www.chromestatus.com/feature/4764225348042752

In the next krpano release this change will be included/respected.

A workaround for the moment is possible - add these lines in the html file just before the embedpano() call:

Source code

1
2
3
navigator.pointerEnabled = navigator.maxTouchPoints > 0;               // Edge 17 touch support workaround
document.documentElement.ontouchstart = navigator.maxTouchPoints > 0;  // Chrome 70 touch support workaround
embedpano(...);


See also here about the Edge 17 case:
pinch-in pinch-out does not work on Edge

Best regards,
Klaus

3

Tuesday, November 6th 2018, 11:27pm

You rock man. Thank you!
Hi,

this is the reason:
https://www.chromestatus.com/feature/4764225348042752

In the next krpano release this change will be included/respected.

A workaround for the moment is possible - add these lines in the html file just before the embedpano() call:

Source code

1
2
3
navigator.pointerEnabled = navigator.maxTouchPoints > 0;               // Edge 17 touch support workaround
document.documentElement.ontouchstart = navigator.maxTouchPoints > 0;  // Chrome 70 touch support workaround
embedpano(...);


See also here about the Edge 17 case:
pinch-in pinch-out does not work on Edge

Best regards,
Klaus

Luca Vascon

Beginner

Posts: 8

Location: Venice, Italy

Occupation: VR under any aspect

  • Send private message

4

Wednesday, November 14th 2018, 5:40pm

You saved me once again.

5

Friday, November 16th 2018, 11:18am

Hi Klaus,

Thanks for the workaround. However, on my project, adding this code seems to make 'device.touchdevice' always true regardless of what device you are using? Is that correct? I have a series of if(device.touchdevice statements which previously would only be true for touch devices, now it's true for everything? How should I handle this?

Thanks in advance.

6

Saturday, November 17th 2018, 10:20am

Hi,
However, on my project, adding this code seems to make 'device.touchdevice' always true regardless of what device you are using? Is that correct?

No, that's not correct.

The device would be only detected as touch device when the navigator.maxTouchPoints value from the browser is greater than 0 - and that should only happen on devices that have touch input support.

On which non-touch-devices do you test where this doesn't work?

And please try entering 'navigator.maxTouchPoints' in the browser-console on these devices to check its value.

It would be possible to change the check to 'navigator.maxTouchPoints > 1' to detect if more than one touch point is support, e.g. for multi-touch-devices, but normally that should be not necessary...

Best regards,
Klaus

7

Friday, November 23rd 2018, 2:27pm

Subscribing to this thread.

8

Monday, December 3rd 2018, 10:31pm

Source code

1
2
navigator.pointerEnabled = navigator.maxTouchPoints > 0;               // Edge 17 touch support workaround
document.documentElement.ontouchstart = navigator.maxTouchPoints > 0;  // Chrome 70 touch support workaround

with this my panotour does not work at all on msie edge.
the gui is like frozen, i cant look around in the pano and there is no reaction to any clicks.
...?

9

Tuesday, December 4th 2018, 2:06am

Hi,

Noticed weird things happening using this fix . For example, if you use the tooltip.xml tooltip plugin, it wont fire onhover hotspots anymore, only onclick.

Any idea?

10

Tuesday, December 4th 2018, 11:53am

Hi,

right, I can confirm, the Chrome workaround interferes with the Edge workaround ;-)

The 'ontouchstart' would need keep 'undefined' on non-touch devices and not 'false' like in the workaround.
That's also the related to the 'device.touchdevice' problem from above in the thread.

Here an 'improved' version of the workaround:

Source code

1
2
3
navigator.pointerEnabled = navigator.maxTouchPoints > 0; // Edge 17 touch support workaround
document.documentElement.ontouchstart = navigator.maxTouchPoints > 0 ? function(){} : undefined; // Chrome 70 touch support workaround
embedpano(...);


Btw - in the next krpano release this will be fixed internally and directly of course.

Best regards,
Klaus