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

        Ken Fyten made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Assignee Priority P2
        Mircea Toma made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        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.
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #28642 Thu Apr 05 12:16:01 MDT 2012 mircea.toma ICE-7839 Always return 'top' or 'left' style properties in pixels.
        Files Changed
        Commit graph MODIFY /icefaces/trunk/icefaces/bridge/lib/prototype/dom.js
        yip.ng made changes -
        Attachment screenshot-1.png [ 14189 ]
        Ken Fyten made changes -
        Assignee yip.ng [ yip.ng ] Mircea Toma [ mircea.toma ]
        yip.ng made changes -
        Workaround Description Use autoCentre if applicable or turn off draggability. Use autoCentre if applicable or turn off draggability. Or use px instead of % for positioning.
        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
        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

        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.
        Ken Fyten made changes -
        Fix Version/s EE-1.8.2.GA_P04 [ 10280 ]
        Assignee Priority P2
        Assignee yip.ng [ yip.ng ]
        Arran Mccullough made changes -
        Attachment Case10891Example.war [ 14117 ]
        Attachment Case10891Example.zip [ 14118 ]
        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.
        Arran Mccullough made changes -
        Field Original Value New Value
        Salesforce Case [5007000000KFhjU]
        Arran Mccullough created issue -

          People

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

            Dates

            • Created:
              Updated:
              Resolved: