Details
-
Type:
Bug
-
Status: Closed
-
Priority:
Trivial
-
Resolution: Fixed
-
Affects Version/s: 1.8.1
-
Fix Version/s: 1.8.2
-
Component/s: ICE-Components
-
Labels:None
-
Environment:All
Description
- 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.
-
Hide
- Case8527Example.war
- 5.37 MB
- Arran Mccullough
-
- META-INF/MANIFEST.MF 0.1 kB
- META-INF/context.xml 0.1 kB
- WEB-INF/classes/.../example/TestBean.class 0.7 kB
- WEB-INF/faces-config.xml 0.5 kB
- WEB-INF/lib/FastInfoset.jar 285 kB
- WEB-INF/lib/backport-util-concurrent.jar 343 kB
- WEB-INF/lib/commons-beanutils.jar 113 kB
- WEB-INF/lib/commons-collections.jar 162 kB
- WEB-INF/lib/commons-digester.jar 104 kB
- WEB-INF/lib/commons-fileupload.jar 56 kB
- WEB-INF/lib/commons-logging.jar 30 kB
- WEB-INF/lib/icefaces-comps.jar 1.93 MB
- WEB-INF/lib/icefaces.jar 1.06 MB
- WEB-INF/lib/jsf-api.jar 350 kB
- WEB-INF/lib/jsf-impl.jar 816 kB
- WEB-INF/lib/jstl.jar 20 kB
- WEB-INF/.../krysalis-jCharts-1.0.0-alpha-1.jar 151 kB
- WEB-INF/web.xml 3 kB
- index.jsp 0.1 kB
- main.jspx 2 kB
-
- Screenshot-01.JPG
- 133 kB
-
- screenshot-2.jpg
- 101 kB
Activity
- All
- Comments
- History
- Activity
- Remote Attachments
- Subversion
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.
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
- ......
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.
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.
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.
Basic example code:
<ice:form>
<ice:commandButton value="Open" actionListener="#
<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>
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.