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
Hi Mathias,
Seems you issue is somewhat similar to ours. Did you find solution to this issue? We have a similar issue. We have WAB application and have custom and ESRI widgets. If we launch the application inside a webbrowser control, the widgets cannot be resized or moved. But if I run it directly in browser it works fine (both IE and chrome). I have IE 11.
We tried several options and so far no solution.
Thanks
Cyril
Well, I did, but at the expense of another function. It was a while ago that I solved this but as I remember it I played around with different values for a meta tag in the HTML. You can read about it here:
Try with some different values there and see if it works for you.
Good luck!
Totally unrelated but I had some issues using a JS API map within a web control recently and, during my research about it, I came across this response on Stackoverflow which really gives a lot of great information about the limitations of the webcontrol. I think you've stumbled across it but point #2 in my link discusses that the webcontrol uses default (or least) rendering engine to ensure compatibility. In order to change this, you have to change the META tags.
In my own situation, once I did this, my embedded JS API loaded and operated as it should. Good luck!
Steve
Thank you everyone for taking time to help me. I think we finally resolved our issue by migrating our application to the latest version of Web App Builder.
Cyril