Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Tim 1193 posts 2675 karma points MVP 3x c-trib
    Apr 30, 2014 @ 15:32
    Tim
    0

    Selecting file locks other text fields on DocType in IE10/11

    One of our clients has spotted the following issue, I've repo'd it on two sites, both running 6.1.6.

    Have a DocType with some text fields/boxes, and a DAMP picker, set to single file mode. Select a file, but it must be a document or video (not an image). Once you have selected the file, you can no longer click on, focus on, or edit any of the other text fields or boxes on the page, until you save the page.

    This appears to be an issue with the built in media picker as well. Can anyone else reproduce this? It only seems to happen with IE10/11. Earlier versions of IE seem to be fine.

  • Jeroen Breuer 4908 posts 12265 karma points MVP 4x admin c-trib
    Apr 30, 2014 @ 15:44
    Jeroen Breuer
    0

    Hello,

    I'm aware of the problem, but it's a IE10/11 bug and it's not related to DAMP. The problem should also happen after other modals are openend. I tried to fix it, but never found a solution.

    Jeroen

  • Tim 1193 posts 2675 karma points MVP 3x c-trib
    Apr 30, 2014 @ 15:51
    Tim
    0

    I thought it might be! If we manage to find a workaround, I'll let you know :)

  • Tim 1193 posts 2675 karma points MVP 3x c-trib
    May 01, 2014 @ 14:27
    Tim
    0

    The problem appears to be in the Treepicker.aspx file for the picker dialog. Other dialogs seem to be OK for me. It looks like the issue occurs whenever you select anything below the root. So "Media Root > File" is fine, but "Media Root > Folder > File" causes the issue to occur.

    Calling the method that clicking the links should call, dialogHandler() and passing in a valid ID from the IE debug console in the context of the page works as you'd expect, it sets the media item and doesn't kill the text fields. My guess is that some event handler is doing something in the sub-items that's making IE unhappy. I'm going to continue to dig into this and see if I can pinpoint the exact issue. In the meantime, I've added a bug to the issue tracker for it if you want to vote for it: http://issues.umbraco.org/issue/U4-4790

    :)

  • Tim 1193 posts 2675 karma points MVP 3x c-trib
    May 02, 2014 @ 13:17
    Tim
    0

    Righty ho, I've managed to code a fix. I can't track down the underlying issue, my JS Kung Fu isn't strong enough, and the modal JS isn't very easy to debug. BUT, I have discovered that focusing the edit iFrame after you select something with a picker fixes the issue nicely and makes all of the text fields responsive again.

    I'm going to submit a fix on GitHub, but if you want to fix the issue now, open "/umbraco_client/ui/modal/modal.js" and go to line 231, which should be the open file which looks like this:

     close: function(rVal) {
                /// <summary>Closes the modal window</summary>
                /// <param name="rVal">if specified, will add this parameter to the onCloseCallback method's outVal parameter so it may be used in the closing callback method
                this._rVal = rVal;
                top.focus();
                this._obj.jqmHide(); //do the hiding, this will call the onHide handler
            },
    

    Change the function to this:

    close: function(rVal) {
                /// <summary>Closes the modal window</summary>
                /// <param name="rVal">if specified, will add this parameter to the onCloseCallback method's outVal parameter so it may be used in the closing callback method
                this._rVal = rVal;
                top.focus();
                this._obj.jqmHide(); //do the hiding, this will call the onHide handler
                //horrible hack to make text fields selectable agan in IE (temporary fix)
                if ($("#right").length)
                {
                    $("#right").contents().find("body").focus();
                }
            },
    

    And clear the client dependency cache etc, and your pickers should work in IE9+ again. The fix doesn't appear to negatively affect any other browsers that I can find.

    :)

Please Sign in or register to post replies

Write your reply to:

Draft