AnsweredAssumed Answered

Problem with dgrid-select event in the FeatureTable dijit

Question asked by brakjoller on Mar 2, 2016
Latest reply on Nov 10, 2016 by cyrilcherian

Hi,

 

I have a really tricky problem related to the FeatureTable widget from the JavaScript API, and the way the click event on the table works (actually it is the dgrid-select event that does not fire when clicking with the mouse, in a certain scenario).

 

Below are two links to a simple map that displays the FeatureTable widget. If you open them in a stand-alone browser they both work (tested both in Chrome and Internet Explorer 11). “Work”, here, means that the mouse click is handled and you will get an alert box.

 

However, the moment I open the links in the WebBrowser control provided in .NET (embedded inside IFS Applications, our .NET application), on a Windows machine, the first example fails. What still works is the event that handles the keyboard up and down arrows, so the dgrid-select event is not completely broken.

 

Now, I know how this looks, there is of course something “we do” in how we set up the WebBrowser control, and that might be true, but I cannot figure out what it could be. I am using Internet Explorer 11 on my PC and it has no problem getting both examples to work, in the browser itself. But embedded inside our application, in a WebBrowser control, only the second example works (again, “works” mean that the click event on the feature table is catched). Also, to make things even more strange, I made a super simple .NET (C#) application that only embeds the WebBrowser control and nothing more, and it works there too, so it is related to *how* we use the WebBrowser control…

 

The only difference in the second example compared to the first is this line:

 

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

 

This tag tells Internet Explorer to be in “IE9 compatibility mode” (or similar), and it solves the problem. However, the code *does* work in IE11, outside the WebBrowser control and I don’t want to “dumb down” my HTML code to IE9 level (among other things, it makes another thing that I use fail, when it comes to using client-configured labels on feature layers).

 

So, the cause of the problem is in some sense on my side, but it is extremely hard to debug this, since I don’t own the feature table code and cannot understand what might make the onclick event not working (is something else handling it, silencing it, perhaps?). Apparently there is something that makes the onclick handling fail. I wonder if anyone has any idea on how I could tackle this problem, it will be greatly appreciated. Is there some feature/capability I can check for in my JavaScript, that could suggest the functionality does not work, or similar? It might be hard or impossible for others to recreate this, but any clue about where I should look and what I can try is welcome.

 

Here are the two web pages:

 

Does not work (inside WebBrowser control):

 

http://klibbtools.com/featuretable1.html

 

Does work (inside WebBrowser control):

 

http://klibbtools.com/featuretable2.html

 

By the way, this problem started to appear, I think, when my machine got Internet Explorer 11 some weeks back.

 

Thanks!

 

/Mathias

Outcomes