Bug #133785, was updated on 2001-Feb-23 09:36
Here is a current snapshot of the bug.
Project: DynAPI 2
Category: Browser-Specific Issue
Status: Open
Resolution: None
Bug Group: None
Priority: 5
Submitted by: scottsevertson
Assigned to : nobody
Summary: NS 4 onclick & DragEvent
Details: Under Netscape 4.x:
Child layers of a draggable layer do not recieve onclick events.
Cause:
Cancelling an onmousedown event in NS 4.x prevents the onclick event from
firing. DragEvent.js (from the current release) calls
e.cancelBrowserEvent() in the DragEvent.lyrListener.onmousedown function
(line 26).
Fix:
Commenting out e.cancelBrowserEvent() in DragEvent.js resolves the
symptoms, although I am not sure of the possible repercussions of this.
Test case:
Click the "X" layer. Console does not show onclick event, but does show
onmousedown and onmouseup events.
Appply the above Fix and try again. the onclick event fires.
<HTML>
<HEAD>
<TITLE>DynAPI Testing</TITLE>
<SCRIPT LANGUAGE="JavaScript" SRC="../src/dynapi.js"></SCRIPT>
<SCRIPT LANGUAGE="JavaScript"><!--
DynAPI.setLibraryPath("../src/lib/");
DynAPI.include("dynapi.api.*");
DynAPI.include("dynapi.util.console.js");
var lyrChild, lyrParent;
DynAPI.onLoad = function() {
var evtChild;
DynAPI.console.open();
lyrParent = new DynLayer("Parent", 100, 200, 300, 200, "#CCCCCC");
lyrChild = new DynLayer("Child", 270, 10, 20, 20, "#FFFFFF");
lyrParent.setHTML("<EM>Parent</EM>");
lyrChild.setHTML("<STRONG>X</STRONG>");
DragEvent.setDragBoundary(lyrParent);
DragEvent.enableDragEvents(lyrParent);
evtChild = new EventListener(lyrChild);
evtChild.onclick = function(e) {
DynAPI.console.write("Child: onclick");
lyrParent.deleteFromParent();
}
evtChild.onmousedown = function(e) {
DynAPI.console.write("Child: onmousedown");
}
evtChild.onmouseup = function(e) {
DynAPI.console.write("Child: onmouseup");
}
lyrChild.addEventListener(evtChild);
lyrParent.addChild(lyrChild);
DynAPI.document.addChild(lyrParent)
}
//--></SCRIPT>
</HEAD>
<BODY BGCOLOR="#FFFFFF">
</BODY>
</HTML>
For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=133785&group_id=5757
_______________________________________________
Dynapi-Dev mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/dynapi-dev