Opened 5 years ago

Closed 4 years ago

Last modified 4 years ago

#18602 closed defect (fixed)

dropdown does not open in IE10+ in embedded C# WebBrowser Control

Reported by: smaranh Owned by: bill
Priority: undecided Milestone: 1.10.5
Component: Events Version: 1.10.4
Keywords: Cc:
Blocked By: Blocking:

Description

C# WebBrowser? control emulates the system's Internet Explorer. SO on system with IE 10+, the C# WebBrowser? control has navigator.MSPointerEnabled = undefined and MSPointerDown is not fired. Due to this, when I upgrade to Dojo 1.10, the _HasDropDown only triggers the "click" event (_onDropDownClick) when I click on the dropdown and not the _onDropDownMouseDown().

Due to which the dropdown does not open. There is no issue, when the system has IE 9. This occurs only in IE 10+.

Any fix for this?

Attachments (1)

testApp.7z (27.1 KB) - added by smaranh 5 years ago.
Has the Visual Studio project that shows the webBrowser control has msPointerEnabled set to false.

Download all attachments as: .zip

Change History (11)

comment:1 Changed 5 years ago by bill

Component: GeneralEvents
Owner: set to smaranh
Status: newpending

I'm not following you. IE 10 has MSPointerEnabled = true, right? So if the C# WebBrowser? control emulates the system's Internet Explorer, then on a system with IE 10, shouldn't MSPointerEnabled be true in the WebBrowser? control?

comment:2 Changed 5 years ago by smaranh

Status: pendingnew

Unfortunately, the webBrowser control emulates the desktop IE 10+ browser but the navigator.msPointerEnabled is still false, unlike the desktop browser where it is true.

Due to this, the events added by the dojo/touch.js to the HTML doc are not recognized by the webBrowser control and the event is never fired.

If I force the html doc to be IE9 with

<meta http-equiv="X-UA-Compatible" content="IE=9" />

Everything works fine, since there are no pointerDown/MSPOinterDown events for IE9 and dojo does not add those events to the HTML doc and the plain events like mousedown events are picked up.

I am attaching the Visual Studio project which when run points to this jsfiddle, https://jsfiddle.net/727Kf/4/embedded/result/

If the same link is run on IE10+ desktop browser, you can see the events being fired but on a webBrowser control (testApp [Visual Studio project in the attachment]), the msPointerEnabled is false.

I also had to make few changes to my windows registry (http://weblog.west-wind.com/posts/2011/May/21/Web-Browser-Control-Specifying-the-IE-Version) to make the browser control more closely emulate the desktop IE Browser but still there is no change.

Version 1, edited 5 years ago by smaranh (previous) (next) (diff)

Changed 5 years ago by smaranh

Attachment: testApp.7z added

Has the Visual Studio project that shows the webBrowser control has msPointerEnabled set to false.

comment:3 Changed 5 years ago by smaranh

Ok one solution that I found was to add

has.add("pointer-events", null, false, true); has.add("MSPointer", null, false, true);

before touch.js checks for hasPointer = has("pointer-events")
has("MSPointer")

comment:4 Changed 5 years ago by bill

Status: newpending

I'm confused. If navigator.msPointerEnabled is false, then _HasDropDown will listen to mousedown and mouseup rather than pointerdown (or MSPointerDown) and pointerup (or MSPointerUp). What's the problem?

comment:5 Changed 5 years ago by smaranh

Status: pendingnew

Actually, with the touch.js in 1.10, it checks for has("pointer-events") or has("MSPointer") and not navigator.msPointerEnabled, which is what the check was in 1.9. Since the webBrowser control behaves like IE10/IE11, these checks return true but for some reason the navigator.msPointerEnabled is false. This might be a Microsoft bug.

Last edited 5 years ago by smaranh (previous) (diff)

comment:6 Changed 5 years ago by bill

Owner: changed from smaranh to Sebastien Pereira
Status: newassigned

OK, and has("MSPointer") is defined by:

has.add("MSPointer", "msMaxTouchPoints" in navigator)

I don't know why it's checking for msMaxTouchPoints rather than msPointerEnabled. That code is from Sebastien Periera from https://github.com/dojo/dojo/commit/b25b080d6fb0e1b9e64ba48e303d207614f80ada, so Sebastien, can you handle this ticket?

Last edited 5 years ago by bill (previous) (diff)

comment:8 Changed 4 years ago by bill

Milestone: tbd1.10.5
Owner: changed from Sebastien Pereira to bill

OK, I'll do it.

comment:9 Changed 4 years ago by bill

Resolution: fixed
Status: assignedclosed

Pushed in 17ed3d6c61a787906ddae07176119508ef25cbac and 0ccf0f44a0d63d9a474a9dc9fb669d6ec58e5aec.

comment:10 Changed 4 years ago by bill

New fix pushed in 1d3a775302afdf33df9dea85457625aa9860de71 and 9daed5656be2ba06a00b036b1d021eabb36f8d58.

Note: See TracTickets for help on using tickets.