From: Guangyi Wu <gua...@al...> - 2000-12-06 09:23:33
|
> > 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 |
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 > |
From: Robert R. <rra...@ya...> - 2000-12-06 15:40:27
|
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. 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 |
From: Simon D. M. <di...@bi...> - 2000-12-06 18:45:22
|
> > 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. I tested you your patch and it worked fine. I guess the IE specific method that Dan was mentioning was document.selection.clear() but your patched code worked fine without it. I did notice that cancelling the mousemove was enough to turn of selection for ns4 and ie5 while ns6 needed the mousedown cancelled as well. Not sure why. Dicon |
From: <f.k...@t-...> - 2000-12-11 09:09:49
|
hi all. is this event-bug in ns6 (events are triggered multiple times) fixed already? florian. |
From: Scott A. L. <sc...@sc...> - 2001-01-10 17:46:23
|
FWIW I have some information on getting content size in NS6. It's not a total solution, though. In both NS6 and IE5/5.5, you can do this: w = layer.offsetWidth h = layer.offsetHeight These are not part of W3C's CSS spec, and they're not in the .style property of the element. layer.offsetHeight is pretty accurate for getting the height of a layer you haven't explicitly set a height value for. However, offsetWidth always ends up giving you the width of the parent element, because relatively positioned DIVs tend to stretch width-wise, filling the area of their parent. So there is no "offset" difference. For example, I ran a test: <div id="myDiv">Hello</div> The values come out to be: offsetWidth = 1162 offsetHeight = 19 offsetHeight is correct, but offsetWidth is the width of the document (my browser window), which is the <DIV>'s parent. Hope that helps somebody. scottandrew -- scott andrew lepera ----------------------------------- web stuff: www.scottandrew.com music stuff: www.walkingbirds.com |