473,795 Members | 2,391 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Detecting onmouseup outside browser window?

If I perform a mousedown within a document, move the mouse outside the
browser window, and then release the mouse button, the document.onmous eup
event does not fire. Is there any way to detect a mouseup event outside the
document?

Also, how can I get the relative coordinates of the cursor while it is
outside the browser?

Thank you.
Jul 23 '05
20 7941
Matt Kruse wrote:
Andrew Thompson wrote:
The natural assumption on this group is that you
are developing for the web unless otherwise stated.
On the web, it does not work. ( Note that you
have already had a 50% failure rate in the
4 tests conducted. )

It would be more correct to say that on the web, it does not work with all
browsers, but most likely does work for the majority of users. Also, it
appears to degrade gracefully (not causing any problems in browsers where it
doesn't work) which is exactly what we'd want.


When I tested it in Mozilla, it half worked. It let me drag it down, and
then when I released the mouse (expecting it to stop scrolling), it
continued to try to move the cat downwards. Even when I went to the top
of the document and clicked on it, it continued to try to scroll the cat
downwards. Not what I would consider "degrading gracefully".

--
Randy
Chance Favors The Prepared Mind
comp.lang.javas cript FAQ - http://jibbering.com/faq/
Jul 23 '05 #21

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
4123
by: Frances Del Rio | last post by:
pls, why is this not working? <SCRIPT language=JavaScript type="text/javascript"> var br = '<SCRIPT language=Javascript' br += 'src="js_pop.js" type="text/javascript">' br += '</SCRIPT>' var op = '<SCRIPT language=Javascript' op += 'src="js_pop-op.js" type="text/javascript">' op += '</SCRIPT>' if (navigator.userAgent.indexOf('Opera') != -1 ) {
2
5792
by: David Wake | last post by:
I am a complete Javscript newbie trying to produce a user interface similar to Google Maps -- the user should be able to click anywhere on the map and drag it in any direction. The Javascript works OK when the map is only dragged a few pixels. If the map is dragged any significant distance, however, the cursor changes to a document-like icon (in Firefox 1.5) or a circle with a line through it (in IE 5) and no onMouseUp event is fired on...
79
3799
by: VK | last post by:
I wandering about the common proctice of some UA's producers to spoof the UA string to pretend to be another browser (most often IE). Shouldn't it be considered as a trademark violation of the relevant name owner? If I make a whisky and call it "Jack Daniels", I most probably will have some serious legal problems. "Mozilla" partially appeared because NCSA stopped them from using "Mosaic" in the UA string. Is it some different...
5
13699
by: Dag Sunde | last post by:
Is it possible to detect if the user minimizes the browser-window? I do some polling, and want to stop it while the window in minimized, but not when it only is blurred... TIA... -- Dag.
3
1551
by: mk | last post by:
Hi I'v got the following javascript (part of it) that works with the event onmouseup: // Attach event handlers to all images within container LICollection=document.getElementById("MDME").getElementsByTagName("LI"); if (LICollection!=null) { for (l=0; l<LICollection.length; l++) {LICollection.item(l).onmouseup=onMouseUpHandler;}
1
3063
by: Jason | last post by:
I am creating a Comet/Ajax chatroom system. When people go to the page, it will add them to the list of people in the room via window.onload. When they leave, disconnect, go to another page, or close browser, I need to remove them from the room. I use window.onbeforeunload, but it seems it doesn't always fire. IE & firefox will only unload sometimes - sometimes I think maybe its caching the page, and not calling onbeforeunload (my...
9
7604
by: jon | last post by:
Hello, I'm trying to experiment with some javascript to do some custom dragdrop handling. I wish to use the onMouseDown event to trigger the start of my drag, and onMouseup for a potentential drop. I hope to turn on the onmouseup only in onmousedown. And eventually go one step further and incorporate onmousemove for a true drag workflow. I'm running into a problem however, where after mousedown, mouseup will not fire when I release...
1
2321
by: Mango | last post by:
I'm trying to print some text in a very specific position on a page, so that it will show through the window of an envelope when folded. This is easy to do, as long as the browser's print margins are set to 0, or I subtract the width of the margins from the position of the text. My question is: is there a technique for detecting browser print margins? It'd be nice not to have to warn users to set them to something specific.
11
3478
by: yawnmoth | last post by:
http://www.frostjedi.com/terra/scripts/demo/onmouseup.html In Firefox, if I click in the black box and then release, I get a popup. If I click, drag the cursor, and then release, I don't. Similarly, if I click and then release outside of the black box, I don't get a popup, and I don't understand why. If I comment out "document.getElemenById("demo").onmousedown = mousedown;", it works. Why would that make a difference?
0
9519
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10438
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10001
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9042
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6780
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5437
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5563
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3727
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2920
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.