ICEfaces
  1. ICEfaces
  2. ICE-7839

ice:panelPopup - draggable popup position is changed upon first click of header in IE

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: EE-1.8.2.GA_P03
    • Fix Version/s: EE-1.8.2.GA_P04
    • Component/s: ICE-Components
    • Labels:
      None
    • Environment:
      IE7/8/9
    • Workaround Exists:
      Yes
    • Workaround Description:
      Use autoCentre if applicable or turn off draggability. Or use px instead of % for positioning.

      Description

      An ice:panelPopup has some custom CSS to position it in a specific location and is set to be draggable. Upon selecting the header when it is first rendered, the popup gets positioned in a different location. This only happens with in IE and with a draggable popup. It doesn't matter if it is modal or non-modal. This happens only on the first opening of the popup when the page is first loaded, all subsequent opening works fine.

      Setting autoPosition helps a bit, instead of staying in the moved position it snaps back to the original location.

        Activity

        Hide
        Arran Mccullough added a comment -

        Test case to reproduce issue. Steps to reproduce:

        • Load app in IE.
        • Click on the Open button.
        • Click on the header of the popup.
        Show
        Arran Mccullough added a comment - Test case to reproduce issue. Steps to reproduce: Load app in IE. Click on the Open button. Click on the header of the popup.
        Hide
        yip.ng added a comment - - edited

        This is caused by ICE-6889: massive changes to prototype JS.

        Revision 24632: works.
        No 24633
        Revision 24634: ICE-6889, JS error.
        Revision 24635: JS error fixed, problem appears.

        Show
        yip.ng added a comment - - edited This is caused by ICE-6889 : massive changes to prototype JS. Revision 24632: works. No 24633 Revision 24634: ICE-6889 , JS error. Revision 24635: JS error fixed, problem appears.
        Hide
        yip.ng added a comment -

        Problem still there at trunk after fix for ICE-7781.

        Show
        yip.ng added a comment - Problem still there at trunk after fix for ICE-7781 .
        Hide
        yip.ng added a comment - - edited

        There is an extra submit on click in IE.

        User style specifies left and top in %: top: 40%; left: 40%;
        Somewhere along the line they are changed to px in the icefacesCssUpdates param: top:40px; left:40px; See screenshot-1.png.
        (Same mistake we made many times before in thinking dimensions and positions are always in pixels?)

        Show
        yip.ng added a comment - - edited There is an extra submit on click in IE. User style specifies left and top in %: top: 40%; left: 40%; Somewhere along the line they are changed to px in the icefacesCssUpdates param: top:40px; left:40px; See screenshot-1.png. (Same mistake we made many times before in thinking dimensions and positions are always in pixels?)
        Hide
        Mircea Toma added a comment -

        The IE specific Element.Methods.getStyle method defined in dom.js (Prototype code) does not return the correct values in pixels when element's 'top' or 'left' properties are queried. Instead it returns the raw values in percentages (or 'em') which later on are converted to integers, which are assumed to represent pixels.

        The fix modifies the method to calculate the current position of the 'top' or 'left' style properties in pixels.

        Show
        Mircea Toma added a comment - The IE specific Element.Methods.getStyle method defined in dom.js (Prototype code) does not return the correct values in pixels when element's 'top' or 'left' properties are queried. Instead it returns the raw values in percentages (or 'em') which later on are converted to integers, which are assumed to represent pixels. The fix modifies the method to calculate the current position of the 'top' or 'left' style properties in pixels.

          People

          • Assignee:
            Mircea Toma
            Reporter:
            Arran Mccullough
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: