At 2001-07-12 00:13, you wrote:
>Well it looks like your right, but there are a few issues, firstly, this is
>only for NS4, the other browser code seems to be missing all together.
>I think the whole thing, crossbrowser should look like this:
>
>This replaces the line nr 147 in mouse.js:
>
>
>
> // Click on links and form elements
> if (e && e.target.handleEvent && e.target!=this)evt.browserReturn =
>e.target.handleEvent(e);
> }else{
> if(e&&e.srcElement!=this)evt.browserReturn =e.returnValue
>
>
>
>The closing bracket is already in the code.
>I tested this, and it solves the problem in IE5.5, Mozilla, and NS4.
>
>It does however cause NS4 to fire two onclick events over a regular
>dynlayer, I think this might be something Jordi could solve easily (?)
>
>Cheers,
>Richard Bennett
For some reason I thought the problem only appeared in NS4...
Now that this is being considered for inclusion in the codebase I suggest that the end
of that function to be (indented so it looks better in email):
// Click on links and form elements
if(e && e.target.handleEvent && e.target!=this) {
evt.browserReturn = (e.target.handleEvent(e) == false)
? false
: evt.browserReturn;
}
}
else {
if(e && e.srcElement!=this)
evt.browserReturn = e.returnValue;
}
return evt.browserReturn;
}
The reason would be to allow the (in this case) onclick-handler to cancel the click
with a "return false". If it instead returned "true" or nothing at all it should
respect the evt.browserReturn value which is true by default unless changed by
evt.cancelBrowserEvent().
This is, of course, untested. Haven't even checked what should be done in IE/Mozilla.
/Lunna
_______________________________________________
Dynapi-Help mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/dynapi-help