Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #28466
| From | Thomas 'PointedEars' Lahn <PointedEars@web.de> |
|---|---|
| Newsgroups | comp.lang.javascript |
| Subject | Re: Move a div with mouse |
| Date | 2015-07-25 14:07 +0200 |
| Organization | PointedEars Software (PES) |
| Message-ID | <13075758.S88mDJZToQ@PointedEars.de> (permalink) |
| References | <mola7b$fmu$1@dont-email.me> <24793803.Cl0v73UULg@PointedEars.de> <mou5ap$180$1@dont-email.me> |
danca (Daniele Campagna) wrote:
> Il 07/24/2015 08:36 PM, Thomas 'PointedEars' Lahn ha scritto:
>> danca (Daniele Campagna) wrote:
>
> […]
> I TRIED to copy-and-paste and then to adjust the [horrible] result.
I think you know what to do now.
> So it is not correct to infer[It exists? I mean make a deduction] that
> if document.addEventListener does not exist <something>.addEventListener
> couldn't instead exist?
Yes.
> Hummmmm...
> (Ubi major minus cessat).
_maior_
>>> […]
>>> }else{ alert("no event")// just in case}
>>
>> This may be a syntax error. Your code is so unreadable that it is
>> difficult to tell without copying and reformatting it.
>>
>>> document.onmouseup = function() {
>>> document.onmousemove = null;
>>> document.onmouseup = null;
>>> }
>>
>> Nonsense.
>
> Ehm... it should cancel the event listeners - and it seems to work in IE
> and FF. What's wrong with canceling eventListeners that simple way?
*Events* are canceled, not event listeners.
You are defining and _undefining_ event listeners here. It makes no sense
to define/*overwrite* an event listener for an event, that may not have been
defined in the first place, just to undefine it when the event is fired.
--
PointedEars
FAQ: <http://PointedEars.de/faq> | SVN: <http://PointedEars.de/wsvn/>
Twitter: @PointedEars2 | ES Matrix: <http://PointedEars.de/es-matrix>
Please do not cc me. / Bitte keine Kopien per E-Mail.
Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Move a div with mouse "danca (Daniele Campagna)" <cyberdanny@tiscalinet.it> - 2015-07-21 13:26 +0200
Re: Move a div with mouse Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-07-24 20:36 +0200
Re: Move a div with mouse "danca (Daniele Campagna)" <cyberdanny@tiscalinet.it> - 2015-07-24 21:58 +0200
Re: Move a div with mouse Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-07-25 14:07 +0200
Re: Move a div with mouse "danca (Daniele Campagna)" <cyberdanny@tiscalinet.it> - 2015-07-25 19:47 +0200
Re: Move a div with mouse Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-07-25 20:54 +0200
Re: Move a div with mouse "danca (Daniele Campagna)" <cyberdanny@tiscalinet.it> - 2015-07-26 12:54 +0200
Re: Move a div with mouse Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-07-26 13:36 +0200
csiph-web