Cross Browser or Quit?

D

David Mark

I'm doing extremely picky tests (put mouse pointer on the dot in "!"

I don't know what that means. Nor does it matter what sort of tests
you are doing. I just repeated my test, concentrating on the white
box and it didn't take five seconds before I was dragging without the
mouse button. Try scrolling the window a bit and then dragging the
things around. That seems to be when the wheels fall off.
and drag) and some very unreasonable things (drag out of the browser,

Don't worry about that.
left side, circle around the browser to the right side and reenter).
Locking in quite well.

As you see it.
You did notice that the blue box is constrained, as if it's a vertical
Yes.

slider? The red and white  boxes can be dragged all over. You can

Not easily.
arrow left or right from the blue box and still drag. This is the
scrollbar behavior on every browser I've tried. (Some limit the x-
distance. Some have no limit.)

I don't follow.
I've introduced an MSIE bug, and there's a scrolling issue but

Why would you introduce such a thing? And what scrolling issue?
otherwise it's working well. I certainly appreciate your advice and
I've taken most of it. (The latest version is delta-free.)

Take all of it. I've been writing drag and drop code for browsers
since IE4.
When I can type again I'll even start quoting numbers. But you've
Whatever.

still not explained why this isn't a problem: without the ceiling,

Why what isn't a problem?
what happens when some one drags a draggable over other things that
may be listening for mouseup and mousemove?

I told you. That should be left to the calling code. After all, that
is what attaches such listeners (or not.)
 
M

Martin Rinehart

The behavior of the blue box could be improved. Try dragging it below
its lower limit, release the mouse, then drag it back up.

I'll see what I can do.
I've also noticed it sometimes misses mouseup events (tested with FF2).

I don't know that I can do anything. If a browser doesn't send an
event ...?
Also, if you want other people to use your code, you may want to add a
proper license.

The whole freeware license thing has become a mess. GPL, LGPL, MIT,
and it goes on. Each having points pro and con. I write articles and
books. I don't want to lose the right to publish my own code.
PS (off-topic), what happened to your fingers? Emacs user?

Freak tennis accident. Try typing w/o your right index finger. Not a
productivity enhancer. (KATE/Kwrite these days.)
 
M

Martin Rinehart

I don't follow. [re dragging w/mouse off draggable]

Drag your favorite browser's scroll bar. Move mouse left or right of
scrollbar and continue to drag. Move your mouse too far off and some
browsers cancel the drag and annoyingly spring back to the pre-drag
position. Others don't put any restriction on the distance away from
the scrollbar, they just continue the drag.
Why would you introduce [an MSIE bug]?

It wasn't exactly my intent.
I told you.  That should be left to the calling code.  After all, that
is what attaches such listeners (or not.)

You're thinking like David Mark. Think about Fred. Fred's a relative
JS newbie. Fred's built a page with code scoured up from around the
web. Fred doesn't know the internals of what he's got and he's only
vaguely familiar with the world of event listeners.
 
D

David Mark

I don't follow. [re dragging w/mouse off draggable]

Drag your favorite browser's scroll bar. Move mouse left or right of
scrollbar and continue to drag. Move your mouse too far off and some
browsers cancel the drag and annoyingly spring back to the pre-drag
position. Others don't put any restriction on the distance away from
the scrollbar, they just continue the drag.
Why would you introduce [an MSIE bug]?

It wasn't exactly my intent.
I told you.  That should be left to the calling code.  After all, that
is what attaches such listeners (or not.)

You're thinking like David Mark. Think about Fred. Fred's a relative
JS newbie. Fred's built a page with code scoured up from around the
web. Fred doesn't know the internals of what he's got and he's only
vaguely familiar with the world of event listeners.

Well, if "Fred" doesn't know how to manage his listeners, then perhaps
he should forget about drag and drop. Besides, the mouseup event
typically fires on the dragged element, so it isn't a big issue.
Trust me, you have bigger issues at the moment and they very well be
related to the "ceiling" (hard to tell until you remove it.)
 
M

Martin Rinehart

Tested without onselectstart. MSIE highlights as you drag. No one
else.

This is the latest:

http://www.martinrinehart.com/examples/js-drag-code.html

This is the latest without the ceiling:

http://www.martinrinehart.com/examples/no-ceiling.html

Status: MSIE won't stop a drag. Everything else runs well. Nothing
runs well if you drag the draggable to scroll the window.

Thinking about moving the "only drag between these limits" logic into
dragger. Putting it in the display callback works, but it's not
elegant.
 
D

David Mark

Tested without onselectstart. MSIE highlights as you drag. No one
else.

This is the latest:

http://www.martinrinehart.com/examples/js-drag-code.html

Still screwed up. Leave it.
This is the latest without the ceiling:

http://www.martinrinehart.com/examples/no-ceiling.html

Status: MSIE won't stop a drag. Everything else runs well. Nothing
runs well if you drag the draggable to scroll the window.

Thinking about moving the "only drag between these limits" logic into
dragger. Putting it in the display callback works, but it's not
elegant.

You're going the wrong way.
 
M

Martin Rinehart

M

Martin Rinehart

I tried to make my own dragging code today:http://www.souagil.com.br/gabriel/drag/
any suggestions will be greatly appreciated.

Sorry about the triple post. Got to learn to use my reader.

Your dragging is getting there. In FF if you drag a couple inches left
of screen, on return the mouse pointer's a couple inches left of the
draggable. Ditto for top. Not an issue in MSIE.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,236
Members
46,822
Latest member
israfaceZa

Latest Threads

Top