That's an interesting thing to try.

My problem is a bit more severe because the items I am moving are divs
that actually have <p> elements attached to them as labels.

Last night I looked at the jQuery solar system...

http://www.willjessup.com/sandbox/jquery/solar_system/rotator.html

That's an interesting demo. His planets are hyperlinks. He did that
because css is willing to scale hyperlinks with font-size. Wild. He
doesn't have a drag interface, so it's all kinda out-of-control. But
it's cool. I notice that when you run his site in IE, you can actually
drag across the planets and select them, which is pretty nasty-
looking. He's saved by the fact that there's no reason for people to
do that.

One possible solution to my mess is to use a bitmapped font rather
than mess with having <p> elements as part of my display.

On Feb 22, 10:28 am, Karl Swedberg <[EMAIL PROTECTED]> wrote:
> Hi Timothy,
>
> sorry I'm jumping into this so late. You've probably already tried
> something like this, but as I was reading your last email below, I
> wondered if you could:
>
> 1.  append a transparent gif to the body on document ready
> 2. make the trans.gif display: none; position:absolute;
> 3. when your event starts ...
>         a. .show() the trans.gif and set its height and width to the
> document's height and width.
>         b. set the z-index of the dragged element to a high number and the z-
> index of the trans.gif to high-number - 1.
> 4. .hide() the trans.gif when the action is complete
>
> so, you're basically sliding in a layer in between the thing you're
> dragging and the rest of the document. just a thought. Again, you may
> have already tried this, or rejected it for a very good reason, but I
> thought I'd throw it out there, just in case it might help.
>
> --Karl
> _________________
> Karl Swedbergwww.englishrules.comwww.learningjquery.com
>
> On Feb 22, 2008, at 10:50 AM, timothytoe wrote:
>
>
>
> > I battled ie through the night. Ultimately, it won.
>
> > There are many ways to address the text selection issue. I found, I
> > think six solutions on the web. I was heavy into capturing the mouse
> > and event propagation (the div I'm "watching" is a few layers deep in
> > the hierarchy).
>
> > All of the solutions, though, drastically affected my framerate and
> > responsiveness. The message system gets gummed up and the user
> > experiences jerks and seizures where it had been perfectly smooth and
> > robust before.
>
> > Finally, at 3am, I decided to stick with the most common solution
> > (onselectstart returning false) and mitigate the framerate issues in
> > other ways. It's a shame. No other browser is detrimentally affected
> > in performance by disallowing text selection.
>
> > If this happens to you, you're not nuts, or at least no more nuts than
> > I am.
>
> > On Feb 21, 5:08 pm, timothytoe <[EMAIL PROTECTED]> wrote:
> >> Returning false for onselectstart <i>severely</i> depressed my frame
> >> rate, which is ridiculous.
>
> >> I tried it in code, and I tried it in the html (ondragstart="return
> >> false" onselectstart="return false"). Either way, wham! Any way you
> >> can test to see if you were hit? Perhaps you were doing something
> >> less
> >> demanding than I am? Or on a faster PC?
>
> >> On Feb 21, 8:46 am, Eli_Cochran <[EMAIL PROTECTED]> wrote:
>
> >>> We recently dealt with the same problem with IE on the Fluid
> >>> project.
> >>> We fixed it by trapping both the ondrag and onselectstart events.
> >>> Note: these events only need to be trapped in IE and they are not
> >>> jQuery events so you need to cast the object to a browser DOM object
> >>> before trapping.
>
> >>> Here is our code. Note that domNode is a jQuery object that was
> >>> set up
> >>> in an earlier function and get(0) is what casts it to a browser DOM
> >>> object.
>
> >>> if (jQuery.browser.msie) {
> >>>        domNode.get(0).ondrag = function () { return false; };
> >>>        domNode.get(0).onselectstart = function () { return false; };
>
> >>> }
>
> >>> - Eli Cochran
> >>>  user interaction developer
> >>>  ETS, UC Berkeley
>
> >>> On Feb 20, 5:23 pm, timothytoe <[EMAIL PROTECTED]> wrote:
>
> >>>> Thanks. I got it to work with 2 preventDefaults (the one for IE and
> >>>> the one for the other browsers), but I've not tried IE6 yet, so I
> >>>> may
> >>>> yet need to have your tricks up my sleeve. Thanks. I'll get back
> >>>> here
> >>>> with a final listing of code once I'm sure I'm working on all the
> >>>> A-
> >>>> grade jQuery-supported browsers.
>
> >>>> On Feb 20, 12:07 pm, "Josh Nathanson" <[EMAIL PROTECTED]>
> >>>> wrote:
>
> >>>>> I believe the one for IE is "stopPropagation()" or something
> >>>>> like that.
>
> >>>>> Also, did you try putting "return false" after all the other
> >>>>> code for your
> >>>>> mousemove?  I seem to recall that helped me in a similar
> >>>>> situation.
>
> >>>>> $("#actionSurface").mousemove(function(e){
> >>>>>    ... save off current x and y ...
> >>>>>    ... move shit around
> >>>>>    return false;  <--- add this
> >>>>>  });
>
> >>>>> -- Josh
>
> >>>>> ----- Original Message -----
> >>>>> From: "timothytoe" <[EMAIL PROTECTED]>
> >>>>> To: "jQuery (English)" <jquery-en@googlegroups.com>
> >>>>> Sent: Wednesday, February 20, 2008 11:48 AM
> >>>>> Subject: [jQuery] Re: How to keep text from being highlighted
> >>>>> when I'm
>
> >>>>> handling the mouse events
>
> >>>>>> Yeah, so surprise. Doesn't work on IE. Anyone have any ideas
> >>>>>> for that
> >>>>>> browser?

Reply via email to