From: Simon D. M. <di...@bi...> - 2000-12-09 11:15:35
|
> Why not just disable selection events all together. It was done in the > dragEvent object way-back when. > Simply put: > if (is.ie) // Prevents text selection when dragging. > document.onselectstart = function () { return false; }; > That stopped IE from selecting other text on the screen when a layer was > being dragged. So presumably you'd have to reverse the change onmouseout or onmouseup. If you you use: if (is.ie) document.selection.clear(); you don't need to do that. >The cancelBrowseEvent is not even needed in the label widget for it to >work correctly. The setting of the cursor (which is done too) seems >to do excactly the same thing. I removed the cancelBrowseEvent in IE >5 and had no troubles with the examples. Just changing the cursor didn't turn off selection on my IE5/Win Dicon |
From: Scott A. L. <sc...@sc...> - 2000-12-10 22:16:42
|
Yeah, that's something I overlooked. setText needs to be called in order to see an immediate change, but there's no reason to call setText every time you change a label property. Doesn't setHTML also fire a load event, too? An addition boolean passed to each of the setter method could determine if the text is to be re-rendered. or optionally, we could just require that setText should be invoked manually, rather than automatically from within another setter method. ------ scott andrew lepera sc...@sc... web stuff: www.scottandrew.com music stuff: www.walkingbirds.com -----Original Message----- From: Robert Rainwater <rra...@ya...> To: DynAPI Development List <dyn...@li...> Date: Friday, December 08, 2000 9:05 PM Subject: Re: [Dynapi-Dev] Label text selection > >Another problem witht the list/label widgets is the many calls to >setText. In ListItem, the onmouseout and mousemouse over makes to >different calls to change the font (forecolor, textcolor). Each one >of these calls, calls setText which sets the html. > >Maybe we should pass a boolean to the font change functions, that >decides whether or not to call setText. > >-- >// Robert Rainwater > >On 12/8/2000, 6:37:49 PM EST, Scott wrote about "[Dynapi-Dev] Label text selection": > >> There's a small snag in Label. In IE, when you use setSelectable to >> prevent text from being selected with the mouse, you're also cancelling >> the browser event. This can also cancel events on the label itself. >> For example, if you build a list item out of a label with rollover color >> change events, sometimes the label text will cancel the onmouseout >> event. If you mouseover the list fast enough you may end up with >> several items stuck in the rollover position. This could cause problems >> with other widgets that use Label. > >> In light of this, I'm wondering if we should restore the optional >> addCover() method that uses a physical layer to cover text. If you >> don't need it, just use setSelectable. > > >_______________________________________________ >Dynapi-Dev mailing list >Dyn...@li... >http://lists.sourceforge.net/mailman/listinfo/dynapi-dev > |
From: Robert R. <rra...@ya...> - 2000-12-11 19:32:19
|
How about an updateText() function added to the label widget that would call setText(). -- // Robert Rainwater On 12/10/2000, 5:18:11 PM EST, Scott wrote about "[Dynapi-Dev] Label text selection": > Yeah, that's something I overlooked. setText needs to be called in order to > see an immediate change, but there's no reason to call setText every time > you change a label property. Doesn't setHTML also fire a load event, too? > An addition boolean passed to each of the setter method could determine if > the text is to be re-rendered. or optionally, we could just require that > setText should be invoked manually, rather than automatically from within > another setter method. > ------ > scott andrew lepera > sc...@sc... > web stuff: www.scottandrew.com > music stuff: www.walkingbirds.com > -----Original Message----- > From: Robert Rainwater <rra...@ya...> > To: DynAPI Development List <dyn...@li...> > Date: Friday, December 08, 2000 9:05 PM > Subject: Re: [Dynapi-Dev] Label text selection >> >>Another problem witht the list/label widgets is the many calls to >>setText. In ListItem, the onmouseout and mousemouse over makes to >>different calls to change the font (forecolor, textcolor). Each one >>of these calls, calls setText which sets the html. >> >>Maybe we should pass a boolean to the font change functions, that >>decides whether or not to call setText. >> >>-- >>// Robert Rainwater >> >>On 12/8/2000, 6:37:49 PM EST, Scott wrote about "[Dynapi-Dev] Label text > selection": >> >>> There's a small snag in Label. In IE, when you use setSelectable to >>> prevent text from being selected with the mouse, you're also cancelling >>> the browser event. This can also cancel events on the label itself. >>> For example, if you build a list item out of a label with rollover color >>> change events, sometimes the label text will cancel the onmouseout >>> event. If you mouseover the list fast enough you may end up with >>> several items stuck in the rollover position. This could cause problems >>> with other widgets that use Label. >> >>> In light of this, I'm wondering if we should restore the optional >>> addCover() method that uses a physical layer to cover text. If you >>> don't need it, just use setSelectable. >> >> >>_______________________________________________ >>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-09 21:20:50
|
> Just changing the cursor didn't turn off selection on my IE5/Win No, but I did allow events to take place over the text, which was the major problem with IE. -- // Robert Rainwater |