ICEfaces
  1. ICEfaces
  2. ICE-4778

Draggable Modal panelPopup issues

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Trivial Trivial
    • Resolution: Fixed
    • Affects Version/s: 1.8.1
    • Fix Version/s: 1.8.2
    • Component/s: ICE-Components
    • Labels:
      None
    • Environment:
      All

      Description

      Issue #1: Moving the mouse pointer quickly when the popup is being dragged produces some undesirable results:
       - The popup will only drag when the mouse pointer is over the header, moving the mouse pointer away from the header stops it from dragging.
       - If the mouse pointer is moved away and the left mouse button is depressed then when the mouse pointer is moved back over the popups header the popup is draggable without clicking on the popup.

      Issue #2: If the popup is dragged to the bottom of the screen and the mouse scroll wheel is scrolled down, the browser scrolls down indefinitely.

      This behavior is not seen in a non-modal popup.

        Activity

        Hide
        Arran Mccullough added a comment -

        Basic example code:

        <ice:form>
        <ice:commandButton value="Open" actionListener="#

        {testBean.togglePopup}"/>
        <ice:panelPopup autoCentre="true"
        draggable="true"
        modal="true"
        style="height: 150px; width: 300px;"
        positionOnLoadOnly="true"
        rendered="#{testBean.popupRendered}">
        <f:facet name="header">
        <ice:outputText value="Test Draggable Modal Popup"/>
        </f:facet>
        <f:facet name="body">
        <ice:panelGroup>
        <ice:commandButton value="Close" actionListener="#{testBean.togglePopup}

        "/>
        </ice:panelGroup>
        </f:facet>
        </ice:panelPopup>

        </ice:form>

        Show
        Arran Mccullough added a comment - Basic example code: <ice:form> <ice:commandButton value="Open" actionListener="# {testBean.togglePopup}"/> <ice:panelPopup autoCentre="true" draggable="true" modal="true" style="height: 150px; width: 300px;" positionOnLoadOnly="true" rendered="#{testBean.popupRendered}"> <f:facet name="header"> <ice:outputText value="Test Draggable Modal Popup"/> </f:facet> <f:facet name="body"> <ice:panelGroup> <ice:commandButton value="Close" actionListener="#{testBean.togglePopup} "/> </ice:panelGroup> </f:facet> </ice:panelPopup> </ice:form>
        Hide
        Deryk Sinotte added a comment -

        Please look at these additional modal popup issues in context with the issues you are already looking at regarding popups. Feel free to make separate JIRAs as required.

        Show
        Deryk Sinotte added a comment - Please look at these additional modal popup issues in context with the issues you are already looking at regarding popups. Feel free to make separate JIRAs as required.
        Hide
        yip.ng added a comment -

        Seems when you set a modal dialog to draggable and try to drag it, it just goes under the iframe and can't be dragged anymore. See Screenshot-01. Need to fix this first.

        Show
        yip.ng added a comment - Seems when you set a modal dialog to draggable and try to drag it, it just goes under the iframe and can't be dragged anymore. See Screenshot-01. Need to fix this first.
        Hide
        yip.ng added a comment -

        Fixed above problem (i.e. popup going under iframe).

        Show
        yip.ng added a comment - Fixed above problem (i.e. popup going under iframe).
        Hide
        yip.ng added a comment -

        When you move the mouse pointer quickly, it leaves the popup and moves onto the iframe, but it seems mouse moves on the iframe doesn't trigger any mouse move event at all, even though there is a mouse move event listener for the document. It is as if the iframe weren't considered part of the document at all. Only mouse moves within the popup are seen by the listener.

        Tried many ways of adding a listener to the iframe. None of them seemed to work.

        Show
        yip.ng added a comment - When you move the mouse pointer quickly, it leaves the popup and moves onto the iframe, but it seems mouse moves on the iframe doesn't trigger any mouse move event at all, even though there is a mouse move event listener for the document. It is as if the iframe weren't considered part of the document at all. Only mouse moves within the popup are seen by the listener. Tried many ways of adding a listener to the iframe. None of them seemed to work.
        Hide
        yip.ng added a comment -

        Seems you can only register an iframe event handler from within the iframe document itself? This poses some problems.

        • right now the iframe blank page is written out by an output stream
        • the iframe doesn't know anything about any popup
        • the popup and drag and drop know about the iframe but can't control its event handling
        • generating the iframe document dynamically on the client side might solve some problems but will cause security warnings in IE
        • need to communicate between the main window and iframe window without triggering security issues
        • need to map cursor positions between main window and iframe window
        • ......
        Show
        yip.ng added a comment - Seems you can only register an iframe event handler from within the iframe document itself? This poses some problems. right now the iframe blank page is written out by an output stream the iframe doesn't know anything about any popup the popup and drag and drop know about the iframe but can't control its event handling generating the iframe document dynamically on the client side might solve some problems but will cause security warnings in IE need to communicate between the main window and iframe window without triggering security issues need to map cursor positions between main window and iframe window ......
        Hide
        yip.ng added a comment -

        See screenshot-2. It was done using document click event handling from within the iframe document itself. Tried doing the exact same thing from the main document. Just couldn't get it to work. (Just tried using the standard W3C addEventListener mechanism. Getting it to work with Prototype may be another hurdle since there is no Prototype in the iframe doc.)

        Tried using a div within the iframe, but I couldn't even find a way to access the div from main document. I could only get to the iframe document object. (Even that is not trivial to do in a cross-browser way.) On the web, some say if the iframe document is from the same domain then it should be fully accessible, some say if the iframe is dynamically created then there may be problems. Anyways I have tried every suggestion I could find but still couldn't get it to work. You always get a null or undefined when you try to access an element in the iframe.

        Show
        yip.ng added a comment - See screenshot-2. It was done using document click event handling from within the iframe document itself. Tried doing the exact same thing from the main document. Just couldn't get it to work. (Just tried using the standard W3C addEventListener mechanism. Getting it to work with Prototype may be another hurdle since there is no Prototype in the iframe doc.) Tried using a div within the iframe, but I couldn't even find a way to access the div from main document. I could only get to the iframe document object. (Even that is not trivial to do in a cross-browser way.) On the web, some say if the iframe document is from the same domain then it should be fully accessible, some say if the iframe is dynamically created then there may be problems. Anyways I have tried every suggestion I could find but still couldn't get it to work. You always get a null or undefined when you try to access an element in the iframe.
        Hide
        yip.ng added a comment -

        Fixed based on Ken's idea of adding an extra div between the iframe and the popup. Div is cloned to be the same position and size as iframe.

        Show
        yip.ng added a comment - Fixed based on Ken's idea of adding an extra div between the iframe and the popup. Div is cloned to be the same position and size as iframe.

          People

          • Assignee:
            yip.ng
            Reporter:
            Arran Mccullough
          • Votes:
            3 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: