In my LI, I have SPAN element with some text description, and some
action buttons grouped at right. No INPUT fields are there. Oddly
enough, after seeing how Yahoo logger console doing fine when
dragging, I followed the same style by replacing my SPAN into H5
element, the annoying text selection problem no longer existed!!
Putting the text directly under LI works too. So the text selection
situation only happens when I use SPAN to enclose texts.
Anyway, although my problem can be solved by using other tag to
enclose text description, it would be nice if I get to know why.
> Are you describing a situation where you have form input fields
> inside of a draggable object? If so, what is your desired
> interaction -- it seems that you'd need the user to be able to input
> text in the textarea while dragging the object from other parts of
> its surrounding space.
> Eric Miraglia
> Yahoo! User Interface Library
> On Jul 24, 2007, at 1:44 PM, Vanessa Pai wrote:
> > Hi,
> > I am building a drag & drop application based on the 'Sortable List'
> > example. In my application, the user has a list of fixed width
> > rectangle bar (LI elements)which they can drag and drop to resort the
> > list.
> > The problem I am having right now is that sometimes the drag action
> > will be treated as text-selection action if the action start on top of
> > the text description.
> > I tried to disable the text select event by assigning empty function
> > to onselectstart, but then if the drag action start on top of the
> > text, nothing happens, not even the real drag action.(It is required
> > that any area inside the rectangle could trigger the drag and drop in
> > my project, so I can't avoid the text area.)
> > Any hints or suggestions will be very much appreciated.
> > Thanks,
> > Vanessa