13 Replies Latest reply on Feb 9, 2016 8:55 AM by Oliver L

    Cancel dialogs breaks interactive report

    Peeteba

      Hi all,

       

      One of my customers pointed out to an annoying issue.

      They are running APEX 5.0.1. The issue is tested with the sample database application but also occurs in other applications.

      It only seems to happen with Internet Explorer 11. This is the main browser for all its end-users so it is quite painful.


      I start from the interactive report on DEMO_CUSTOMERS. The "Create Customer" button opens a modal dialog with the form page.

      When I cancel this dialog, I don't seem to be able to use the search bar of the interactive report anymore.

      Reload the entire page or refresh the report resolves the issue. Therefore, the issue doesn't occur after updating a row.


      Is someone else experiencing this issue?

      Is this a bug in APEX or is IE11 doing something wrong here?


      Thanks a lot for your feedback!


      Regards,

      Bart

        • 1. Re: Cancel dialogs breaks interactive report
          Peeteba

          No insights on this matter?

          Are we the only one experiencing this? I find this hard to believe...

           

          Regards,

          Bart

          • 2. Re: Cancel dialogs breaks interactive report
            Sven W.

            Hm... I can't reproduce your issue.

            After CANCEL (or EXIT) of the modal page, I am able to click into the search field, search for a value and get a result.

             

            I tested it on Firefox, Chrome and Safari. However not on IE11. So it might be a browser specific issue.

            • 3. Re: Cancel dialogs breaks interactive report
              Pavel_p

              Hi Bart,

              I can confirm this behaviour in APEX 5.0.2 + IE11 and what is even more strange that it seems I cannot type at all untill the page is refreshed (or loaded any other page). I tried to cancel the dialog and I cannot type into the searchbar, moreover if I click "Create Customer" button again, I cannot even enter values into the form. My (localized) IE console says something like "one document should contain only one <html> tag".

              Regards,

              Pavel

              • 4. Re: Cancel dialogs breaks interactive report
                Peeteba

                Thanks Pavel for the confirmation and the clarification of the issue.

                 

                You explicitely don't want to reload the page or refresh the region, hence you're using cancel dialog instead of close dialog.

                If he only 'decent' workaround is to refresh the region or page after cancel dialog, the whole purpose is completely gone.

                 

                Hopefully someone of the development team (Patrick Wolf-Oracle) can briefly take a look at this.

                 

                Regards,

                Bart

                • 5. Re: Cancel dialogs breaks interactive report
                  Peeteba

                  An official service request has been created for this issue. Oracle support is looking into it now.

                   

                  If you are interested or if you're running into the same issue, the SR # is 3-12012289471

                   

                  Regards,

                   

                  Bart

                  • 6. Re: Cancel dialogs breaks interactive report
                    John Snyders-Oracle

                    The problem is due to how IE handles JavaScript that is running in an iframe as the iframe is destroyed.

                    The root cause is responsible for other reports such as

                    APEX 5 dialog close causes script error in IE, reproduced in Demo Application

                    I forget where but there are related reports of not being able to focus fields within the customer dialog after previously canceling it.

                     

                    The way APEX modal dialog pages work is that in the main page there is a jQuery UI dialog with an iframe in it that loads the apex page. [Each main window, and iframe has their own completely separate JavaScript context with its own window object, builtin objects like Array, and Object etc.]  When the dialog is closed the iframe is destroyed. For some reason IE lets JavaScript keep running in the context of the iframe window but has removed all the built-in objects such as Object, Math, Array etc. This can manifest in various ways. Reproducing the problem in any of its forms can be difficult. It is very timing dependent. It may depend on exact IE and OS versions. I have been testing with IE11.0.9600.18124CO update versions 11.0.26 on Windows 7. In some cases it may depend on if developer toolbar is open and just when you press the Cancel button. It may depend on if you press the (X) button in the header or the Cancel button. For some it is very reproducible and others hardly at all.

                     

                    The most reliable way I could see the problem is described in the above referenced forum thread.

                    In IE 11 press F12 to open developer tools and in sample database application, Customers page. Click a customer. Then click Apply Changes.

                    Notice that you hit an exception break with error Object expected.

                     

                    I have to try multiple times before I can get this 'not able to use the search bar' problem to happen. I think it helps if I first focus a field in the dialog before pressing Cancel button. It is most easy to reproduce when developer tools is not open but I have also been able to get it to happen with developer tools open and there is a JavaScript exception having to do with Math.random being missing or other related errors.

                     

                    It took a while to track down what was causing this but once I knew what to search for, an Internet search pointed to a solution to this IE issue based on similar reports about older IE versions. Seems that if you first set the iframe src attribute to "" before destroying iframe these problems do not happen. Seems IE does a better job of cleaning up the JavaScript context.

                     

                    This will hopefully get fixed for 5.1. In the mean time you can try the following:

                     

                    On any page with an APEX modal page dialog on it that is having this problem put the following JavaScript in the page's Execute when Page Loads attribute:

                     

                    $("body").on("dialogclose", ".ui-dialog--apex", function() {
                       $(this).find("iframe").attr("src", "");
                    });
                    

                     

                    This targets apex page dialogs and when they close will first set the iframe src attribute to empty string. Let us know if this works or not.

                    • 7. Re: Cancel dialogs breaks interactive report
                      John Snyders-Oracle

                      I should have also mentioned a end user workaround when you get in this situation is to simply press the tab key.

                      • 8. Re: Cancel dialogs breaks interactive report
                        klacey

                        John,

                        Checked on the system I am working on - experienced the same issue with IE11 as described by the OP.

                        I can confirm that setting the iframe src to "" on dialogclose corrects the issue as you describe (Win7, IE11, Apex 5.0.2, 12.1.0.2)

                        Helpful. Thanks

                        Any chance a fix might be included in a 5.0.x patchset?

                        Kelvin

                        • 9. Re: Cancel dialogs breaks interactive report
                          supatel-Oracle

                          Hi all.

                           

                          I'm working on this from Oracle support. One thing I found is that on Win 8.1 it reproduces at will. On Win 7 it's very tricky to reproduce. Even when I do I'm not sure of its the same issue as what's being reported. John will touch base with you on Monday.

                          • 10. Re: Cancel dialogs breaks interactive report
                            Oliver L

                            Hi John,

                            your page Load Script works for us.

                             

                            We also had the problem using Modal Dialog with IE Edge.

                            Iam running Windows 8.1 with IE Edge and APEX 5.0.3 and Oracle 12c.

                             

                            Patch 5.0.3 itself didn't fixed the issue before.

                            1 person found this helpful
                            • 11. Re: Cancel dialogs breaks interactive report
                              Peeteba

                              Hi all,

                               

                              Oracle Support closed the SR by providing a patch set exception, based on the code changes for APEX 5.1.

                              Thanks to supatel-Oracle and John Snyders-Oracle for your assistance on this!

                              The patch set exception worked for us so this guarantees that APEX 5.1 will fix this issue once it is released.

                               

                              Fingers crossed for the new release to come out soon!

                               

                              Regards,

                              Bart

                              • 12. Re: Cancel dialogs breaks interactive report
                                klacey

                                Hi Bart.

                                Is there a specific patchset number that I can pass on to our DBAs so they can search for the fix on Oracle Support?

                                Or is the fix specific for you?

                                Regards

                                Kelvin

                                • 13. Re: Cancel dialogs breaks interactive report
                                  Oliver L

                                  Take a look into 21517239