Details
-
Type: Bug
-
Status: Closed
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: 1.8.2-EE-GA
-
Fix Version/s: 1.8.3, 1.8.2-EE-GA_P02
-
Component/s: ICE-Components
-
Labels:None
-
Environment:IE7
Description
-
- ICE-5509-patch.rtf
- 4 kB
- Tyler Johnson
-
Hide
- sc8015.war
- 6.15 MB
- Tyler Johnson
-
- META-INF/MANIFEST.MF 0.0 kB
- WEB-INF/lib/backport-util-concurrent.jar 319 kB
- WEB-INF/lib/commons-digester.jar 140 kB
- WEB-INF/lib/FastInfoset.jar 285 kB
- WEB-INF/faces-config.xml 0.3 kB
- WEB-INF/lib/icefaces-comps.jar 1.95 MB
- WEB-INF/lib/commons-fileupload.jar 56 kB
- WEB-INF/lib/jsf-impl.jar 816 kB
- ICEfacesPage1.jspx 1.0 kB
- index.jsp 0.1 kB
- WEB-INF/lib/jxl.jar 708 kB
- WEB-INF/lib/jsf-api.jar 350 kB
- WEB-INF/lib/icefaces.jar 1.19 MB
- WEB-INF/web.xml 4 kB
- WEB-INF/lib/commons-logging.jar 52 kB
- WEB-INF/.../krysalis-jCharts-1.0.0-alpha-1.jar 151 kB
- WEB-INF/lib/commons-collections.jar 558 kB
- WEB-INF/lib/commons-beanutils.jar 226 kB
Activity
- All
- Comments
- History
- Activity
- Remote Attachments
- Subversion
Tried using mouse move events to detect when dragging reaches the viewport border. (pointerX or pointerY = 0.) Because the mouse move events are amalgamated, this would only work if we moved very slowly. Even then it would be confusing to the user, because the mouse listeners would be canceled, even though the use hasn't released the mouse button, and the user has to release and press the mouse button again to drag again.
Tried using onmouseout on document. At first glance it appeared to work, but then strange things started to happen: panel jumps from place to place, panel stops responding to dragging, ...
On further investigation, found that onmouseout seems to occur in all the elements in the document but the document itself. Still no way to tell when the mouse cursor is leaving the document or viewport. See video at http://screencast.com/t/NzY2MTIzOG.
Tried body element. Same results.
Tried window object. No response at all.
Tried detecting mouse button up or down state. Again, it appeared to work at first, but breaks down when more scenarios are tried. Need further investigation on this.
Changed to work like in YUI dialog. See video at http://screencast.com/t/NzlmOTZl.
Revision: 21014
Modified : /icefaces/trunk/icefaces/bridge/lib/scriptaculous/dragdrop.js
Modified : /icefaces/trunk/icefaces/component/src/com/icesoft/faces/component/panelpopup/PanelPopupRenderer.java
Revision: 21015
Modified : /icefaces-ee/branches/icefaces-ee-1.8.2_p01/icefaces/bridge/lib/scriptaculous/dragdrop.js
Modified : /icefaces-ee/branches/icefaces-ee-1.8.2_p01/icefaces/component/src/com/icesoft/faces/component/panelpopup/PanelPopupRenderer.java
Issue does not seem resolved. It's still reproducible with showcase (both jsp and facelets).
Tested on ICEfaces-ee-1.8.2 revision 21027using Tomcat 6 + IE7,8 (Caches are all cleaned before the testing.)
Still can't reproduce on my machine. I have built the war file (EE 1.8.2 JSP using ant build) and deployed on Tomcat 6. Please test:
Yip, I cannot reproduce using your application (tried IE6,7,8). What is your Tomcat 6 version? Thanks.
Sorry, Yip. I used the wrong 1.8.2-ee branch to verify.
Verified successfully on icefaces-ee-1.8.2_p01 revision 21058 using component showcase jsp and facelets-enh
Verified on IE6,7,8 + Tomcat 6.0.26
Reverted changes. Caused problems for positioned panels. See ICE-5561.
These are the original changes, in case some customer needs a patch. But be warned that they will break positioned panels.
Index: ../../svn/ossrepo/icefaces/trunk/icefaces/component/src/com/icesoft/faces/component/panelpopup/PanelPopupRenderer.java
===================================================================
— ../../svn/ossrepo/icefaces/trunk/icefaces/component/src/com/icesoft/faces/component/panelpopup/PanelPopupRenderer.java (revision 21005)
+++ ../../svn/ossrepo/icefaces/trunk/icefaces/component/src/com/icesoft/faces/component/panelpopup/PanelPopupRenderer.java (revision 21014)
@@ -253,7 +253,7 @@
// Rebroadcast Javascript to survive refresh
if (dndType != null) {
- JavascriptContext.addJavascriptCall(facesContext, "Ice.DnD.adjustPosition('" + uiComponent.getClientId(facesContext) + "');");
+// JavascriptContext.addJavascriptCall(facesContext, "Ice.DnD.adjustPosition('" + uiComponent.getClientId(facesContext) + "');");
StringBuffer dropCall = new StringBuffer();
String call = addJavascriptCalls(uiComponent, "DRAG", handleId,
facesContext, dropCall);
Index: ../../svn/ossrepo/icefaces/trunk/icefaces/bridge/lib/scriptaculous/dragdrop.js
===================================================================
— ../../svn/ossrepo/icefaces/trunk/icefaces/bridge/lib/scriptaculous/dragdrop.js (revision 18841)
+++ ../../svn/ossrepo/icefaces/trunk/icefaces/bridge/lib/scriptaculous/dragdrop.js (revision 21014)
@@ -188,6 +188,10 @@
updateDrag: function(event) {
if (!this.activeDraggable) return;
+ if (Prototype.Browser.IE && !(event.button % 2))
var pointer = [Event.pointerX(event), Event.pointerY(event)];
// Mozilla-based browsers fire successive mousemove events with
// the same coordinates, prevent needless redrawing (moz bug?)
@@ -550,6 +554,28 @@
if ((!this.options.constraint) || (this.options.constraint == 'vertical'))
style.top = p[1] + "px";
+ var vpDims = document.viewport.getDimensions();
+ var dims = this.element.getDimensions();
+ var vpOffset = this.element.viewportOffset();
+ var posOffset = this.element.positionedOffset();
+ var diff = vpOffset.left + dims.width - (vpDims.width - 10);
+ if (diff > 0)
+ diff = vpOffset.top + dims.height - (vpDims.height - 10);
+ if (diff > 0)
+ vpOffset = this.element.viewportOffset();
+ posOffset = this.element.positionedOffset();
+ diff = 10 - vpOffset.left;
+ if (diff > 0)
+ diff = 10 - vpOffset.top;
+ if (diff > 0)
if (style.visibility == "hidden") style.visibility = ""; // fix gecko rendering
},
Mouse button state (up or down) seems to change randomly for positioned panels. No good. Changed to use mouse out and toElement = null to detect mouse outside of window. Also, cancel changes to simulate YUI dialog behavior in case they cause more side effects.
Revision: 21175
Modified : /icefaces/trunk/icefaces/bridge/lib/scriptaculous/dragdrop.js
Scriptaculous uses the mouse up event to detect the end of dragging. In IE, seems when you drag outside of the viewport, no mouse up event (or any mouse event?) is fired at all. The demo at the Scriptaculous website works the same. See video at http://screencast.com/t/MTRlMWNhOWUt.
In FF, it works as expected. See video at http://screencast.com/t/OTliN2VhMjAt. (In our component we have changed to make the panel snap back into the viewport.)