I’m building an IE Webbrowser publication using HE 4.6.1 on Windows7 with MSIE9.
My publication runs on a Window8 Pro touchscreen machine (not Windows RT) which has MSIE10 on it, but “navigator.useragent” reports MSIE9, and “touch” events eg ontouchstart and onmspointerdown don’t work.
Is it possible to make HE use MSIE10 if it finds in on the target machine?
I’m working on both a laptop with Win8 and a touch-enabled screen, as well as a Microsoft Surface Pro.
I’ve done some further testing and I was wrong about the MSIE version that HE is using. It is, as you say, finding version 10.
The difficulty is that MSIE 10 doesn’t respond to the ontoushstart/ontouchend events that Chrome and Safari do. It uses the onmspointerdown/onmspointerup events. And I’ve now found that a MS stylus does “touch and drag” in an HE publication on the Surface Pro, but a finger is not doing it on either of my Win8 machines.
I clearly need to do some more testing of how to use the msPointer events within HE! If anybody has any knowledge of this topic I’d appreciate some tips.
The example code (which is repeated here and on many other pages related to gesture events on MSDN) doesn’t work in IE10 RTM, at least not with the mouse as a gesture device.
To make it work, you need to do two things:
Register an event handler for the MSPointerDown event, on the same element that is to receive gestures.
In the handler for MSPointerDown, add the pointer to the gesture – something like evt.currentTarget.gestureObject.addPointer(evt.pointerId).
Now the pointer (touch or mouse) will start firing gesture events.
I’ve had a chance to get back to this topic and I wonder if you can confirm my findings and possibly resolve the issue.
The example page you refer to at msdn.microsoft does nothing if compiled into an IEViewer publication. Further it seems that MSIE10 on Windows8 running in an IEViewer publication doesn’t even enable the msPointer object.
Running directly in MSIE10 a touch or swipe event can be triggered in the yellow box and the document write produces:
Win32
Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.2; WOW64; Trident/6.0; Touch; .NET4.0E; .NET4.0C; .NET CLR 3.5.30729; .NET CLR 2.0.50727; .NET CLR 3.0.30729; Tablet PC 2.0; ASU2JS)
boolean
true
Running in an IEViewer publication a touch or swipe event in the yellow box does nothing and the document write produces:
Win32
Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.2; WOW64; Trident/6.0; ASU2JS)
boolean
false