|
From: Guangyi Wu <gua...@al...> - 2000-12-07 10:13:41
|
> Somehow I missed your post before. Anyway, I got your fixes for IE to
> work, but a do have one question. What is this for:
> if (is.ie) {
> if (evt.browserReturn==false) e.returnValue=false
> }
>
> I did not apply this, and your patch still works.
You are right. It still works without these lines. I added these lines
because I found the example below in the MSDN. I noticed the
event.returnValue is set to false instead of directly returns false. I agree
with you not to apply this as long as it works.
>
> Also, the cursor for IE needs to be set oncreate as well, because if
> you do setSelectable before the create it will never be set.
The current oncreate handler looks like this:
listener.oncreate = function(e) {
var o = e.target
if (!o.selectable) {
if (is.ie||is.dom) {
o.css.cursor="default"
}
}
}
I did not set the css.cursor to "text" if the label is setSelectable before
the create, because the "text" cursor is the default one for creating. In
the function setSelectable, css.cursor has to be set to "text" for
overwritten the non-selectable cursor.
br
George
============================
Cancelling the Default Action
I've given you an example that demonstrates how you can cancel bubbling. Now
let's look at an example that demonstrates how to cancel the default action.
<HTML>
<HEAD><SCRIPT LANGUAGE="JavaScript"><!--
function confirmDefault()
{
sMsg = "Do you want to go to " +
window.event.srcElement.innerText + "? ";
if (!window.confirm(sMsg)) {
window.event.returnValue = false;
}
}
//--></SCRIPT>
<TITLE></TITLE>
</HEAD>
<BODY>
<A HREF="http://www.microsoft.com/sitebuilder/"
ONCLICK="confirmDefault()">
<P>MSDN Online Home Page</A> </P>
</BODY>
</HTML>
In the script above, you can see that the OnClick handler is created to
confirm whether the user will go to the site listed. If the user clicks the
Cancel button, the default action (navigating to the link) is cancelled.
============================
>
> Also, the cursor for IE needs to be set oncreate as well, because if
> you do setSelectable before the create it will never be set.
>
> I updated it in CVS. I did not include the fixes for NS yet, as I
> have not tested it.
>
> --
> // Robert Rainwater
>
> On 12/6/2000, 4:24:08 AM EST, Guangyi wrote about
> "[Dynapi-Dev] Label Cover Bug":
>
> >>
> >> It looks like in IE (I haven't tested NS), that these
> events are not
> >> fired:
> >>
> >> this.selectListener.onmousemove, etc.
> >>
> >> These should be fired when you say setSelectable(false).
> >>
> >> This could be one of the problems with IE not working.
> >>
> > The onmousemove event is not fired because it is not
> registered for DynLayer
> > in the event.js.
>
> > I posted a patch for the label, containing event.js and
> label.js based on
> > 12.01 beta in a zip file, a few days ago. It should be
> fixed in the patch.
>
> > br
> > George
> > _______________________________________________
> > Dynapi-Dev mailing list
> > Dyn...@li...
> > http://lists.sourceforge.net/mailman/listinfo/dynapi-dev
>
>
> _______________________________________________
> Dynapi-Dev mailing list
> Dyn...@li...
> http://lists.sourceforge.net/mailman/listinfo/dynapi-dev
>
|