0

I have jquery dialog, which opens dialogbox from below code and 'close' is done using ClosePopup.

my issue is, when I open the dialog box second time onwards, textbox controls are not able to editable/clickable.

the issue is with IE 11 with this specific browser version.

enter image description here

this.OpenPopup = function (popupId, title, url, height, width) {        
        var $dialog = $('<div id=' + popupId + ' style="z-index:10000;"><iframe id="iframe' + popupId + '" src=' + url + ' style="border: none;overflow-x:hidden; overflow-y:hidden;display: block;" height="100%" width="100%" marginheight="0" marginwidth="0" frameBorder="0" scrolling="no" horizontalscrolling="no" verticalscrolling="no"></iframe></div>')
            .dialog({
                autoOpen: false,
                modal: false,
                height: height,
                width: width,
                closeOnEscape: false,
                draggable: true,
                resizable: false,
                title: title,
                create: function (event, ui) {
                    $(event.target).parent().css('position', 'fixed');
                    $("#" + popupId).css('overflow', 'hidden');
                }
            });                
        $("#" + popupId).dialog("option", "position", { my: "center", at: "center", of: window });
        $("#" + popupId).dialog("open");       

        $('#iframe' + popupId).load(function () {
            var doc = document.getElementById('iframe' + popupId).contentDocument || document.getElementById('iframe' + popupId).contentWindow.document;
            $("#" + popupId).dialog("option", "height", doc.body.offsetHeight);
        });        
    };
    this.ClosePopup = function (popupId) {
        $('#' + popupId).remove();        
    };
Sandip
  • 981
  • 1
  • 6
  • 22
  • Have you tried to simply "close" the dialog rather than removing it? – Dean.DePue Jul 10 '15 at 13:10
  • if we use `close`, it does not destroy the `Div`. so it creates multiple popup divs in html as hidden. so it creates memory leaks. that's why we are destroying it. FYI, if we use `close`, issue will be resolved. – Sandip Jul 10 '15 at 13:23
  • Can you provide a demo of this that actually shows it happening -- the code for the popup contains an iframe, which I guess is where the textbox fields are, but you haven't shown us the code for that, so I can't really know what's going on. – Simba Jul 10 '15 at 13:36
  • 2
    Also, to continue what @Dean.DePue was saying, have you tried using `close`, and then re-populating the same dialog rather than `remove` and rebuilding it from scratch every time? It doesn't have to be a memory leak if you handle it properly. – Simba Jul 10 '15 at 13:38
  • @Simba Regarding Demo. You may use any url where you find any textbox. there is nothing to do with specific url. and for using `close`, I got your point.. I will try and let you know. – Sandip Jul 10 '15 at 14:02
  • I see your dialog box contains an iframe. This is a known bug in Internet Explorer - see https://stackoverflow.com/questions/19150008/ie-9-and-ie-10-cannot-enter-text-into-input-text-boxes-from-time-to-time – Waggers Jul 21 '17 at 15:25

0 Answers0