W3C home > Mailing lists > Public > www-dom@w3.org > January to March 2010

Re: mousedown and mouseup default actions

From: Joćo Eiras <joao.eiras@gmail.com>
Date: Sat, 27 Mar 2010 18:56:26 +0100
To: "Brandon Andrews" <warcraftthreeft@sbcglobal.net>, www-dom@w3.org
Message-ID: <op.u98msbgnjz3wb9@coruscant>
On , Brandon Andrews <warcraftthreeft@sbcglobal.net> wrote:

> <Sirisian> shepazu, so have you thought about defining the default action for
> right and middle mouse buttons?
> Sirisian: http://dev.w3.org/2006/webapi/DOM-Level-3-Events/html/DOM3-Events.html#event-type-click
> <pimpbot> Title: Document Object Model (DOM) Level 3 Events Specification (at
> dev.w3.org)
> <Sirisian> I mean for mousedown and mouseup. Like preventDefault could stop the
> event from going to the browser.
> <shepazu> Sirisian: you're right, those fit more for mousedown than for click
> <shepazu> at least the context menu
> * johnst has quit (Quit: Leaving)
> <Sirisian> So mousedown if you just call prevent default it would stop context
> menu and the stupid middle click thing on some browsers >:|
> <shepazu> if you send a reminder to www-dom@w3.org, I will change that
> So event.preventDefault(); could be used to stop the context menu or middle
> mouse down scroll feature which should be defined as the default actions. Middle
> mouse down causes the scroll feature normally. (In FireFox for instance it only
> creates it when the page is scrollable.) For right click up it normally creates
> the context menu as you know.

Preventing the context menu is possible using the context menu event.
Preventing the scrollable cursor, which usually pops up after middle-click, should be done either with the click or mouseup events (whatever comes last). I think browsers don't fore click for middle-clicking.
Received on Saturday, 27 March 2010 17:57:02 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:36:56 UTC