Select to view content in your preferred language

Code problem IE 9 and up

5253
21
Jump to solution
05-19-2015 06:15 AM
TimWitt2
MVP Alum

Hey everybody,

I am having some issues with an application that I created in IE9 and higher.

Here is a link to my application: Advanced Draw

When I use it in Firefox, Google Chrome and IE 8 everything works fine. Once I switch to IE9 when I place a point, the point is displaced to the top-left. When I switch to IE10 the same happens and I have to click twice to place a point. I can't figure out what the issue could be.

If anybody has any inside!

Thanks,

Tim

0 Kudos
21 Replies
ChrisSmith7
Frequent Contributor
ChrisSmith7
Frequent Contributor

Tim,

Try this:

        map.on("load", function () {
            toolbar = new Draw(map);
            toolbar.on("draw-end", addToMap);
  //toolbar.on("draw-complete", addMeas);
            editToolbar = new Edit(map);
            map.on("click", function (evt) {
                editToolbar.deactivate();
            });
            createMapMenu();
            createGraphicsMenu();
            map.reposition();
            map.resize();
        });

I added "reposition" and "resize" in your map onload event handler. This worked for me when I ran it in IE's debugger.

0 Kudos
TimWitt2
MVP Alum

Chris,

thejus's solution of removing the margin works in IE10 compatibility view but not in IE10 or IE9.

I tried your approach but no luck. Does it work here for you ( I have updated the code to include your solution.

Advanced Draw

0 Kudos
ChrisSmith7
Frequent Contributor

This works for me now in IE11. I tried it using IE 8/9/10 emulation as well, and it works, although I still need to click twice for the point to show. I don't have a "real" instance of IE <11 to test, though...

Try clearing your cache and restarting IE.

RobertScheitlin__GISP
MVP Emeritus

Tim,

   I can report the same results as Chris. Works in IE 11 and IE 8/9/10 emulation as well. Although I don't get the click twice issue at all.

ChrisSmith7
Frequent Contributor

I'm not getting that now, either - works on one click.

TimWitt2
MVP Alum

I'll install IE11 and see if it is just a issue for my particular version.

PS: I am ready for IE to disappear

ChrisSmith7
Frequent Contributor

Should be soon! At least in name... "Microsoft Edge."

0 Kudos
TimWitt2
MVP Alum

After installing IE11, the offset disappeared but the having to click twice issue is still there... very frustrating.

0 Kudos
TomSellsted
MVP Regular Contributor

Tim,

I found some event handling weirdness when creating my Measure Widget Measure Widget 1.1.1 for Web App Builder I had to use some special event handling to accommodate the differences between the versions of Internet Explorer.  My problem was more related to mouse-drag or mouse-move events, but maybe you are having a similar problem?

Regards,

Tom