Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!news.solani.org!.POSTED!not-for-mail From: Thomas 'PointedEars' Lahn Newsgroups: comp.lang.javascript Subject: Re: Move a div with mouse Date: Sun, 26 Jul 2015 13:36 +0200 Organization: PointedEars Software (PES) Lines: 28 Message-ID: <4895006.8eMfdVOhHN@PointedEars.de> References: <24793803.Cl0v73UULg@PointedEars.de> <13075758.S88mDJZToQ@PointedEars.de> <2686661.kNTyxH5vvL@PointedEars.de> Reply-To: Thomas 'PointedEars' Lahn Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8Bit X-Trace: solani.org 1437910766 13598 eJwNykkBACAIBMBKyOnGQYT+EXTeY+LLK9TN1camGcxLIqmo0DmYjb4VwK0/tnYcgkqbuEo+ICoRGg== (26 Jul 2015 11:39:26 GMT) X-Complaints-To: abuse@news.solani.org NNTP-Posting-Date: Sun, 26 Jul 2015 11:39:26 +0000 (UTC) User-Agent: KNode/4.14.2 X-User-ID: eJwFwQkBwDAIA0BLoxCgchoe/xJ2B3XxCnO4YbFc1BQmtYfx7J6oUiEgTT6rdueyObr4PBu1MXlf4DaP/JWlFxs= Cancel-Lock: sha1:uxfgNo66oV6SlfGERMITDU2ClUg= X-NNTP-Posting-Host: eJwFwYEBwCAIA7CbVNqOcxDL/ycsweFiKwgGBnOXXEI/HiTTNp6q7T3Ncx3abs5XihQCPzSCEbM= Xref: csiph.com comp.lang.javascript:28472 danca (Daniele Campagna) wrote: > Il 07/25/2015 08:54 PM, Thomas 'PointedEars' Lahn ha scritto: >> Your code most certainly does not work in Chrome because you are >> assigning to .onmousemove after you called .addEventListener() for the >> same target, which adds *two* event listeners for the same event and >> target: the listener added with .addEventListener() is added after the >> one assigned to .onmousemove. (As I showed earlier this year.) >> >> And it probably does not work in Chrome because your feature test is >> wrong again, a faulty inference: you are testing “window.event” but >> access “e.clientX”, and you are testing “event”, but you are accessing >> “event.pageX”. Debugging should show the underlying assumptions to be >> wrong in the offending runtime environments. > > Hummmmm... Interesting [guess: in the second sentence I should read > "Safari"?]. I have not tested in Safari, but it is probable that the same logic applies there because Safari is based on WebKit, too. The main difference between the first and second _paragraph_ is the certainty of the former and the mere probability of the latter (IMO). -- PointedEars FAQ: | SVN: Twitter: @PointedEars2 | ES Matrix: Please do not cc me. / Bitte keine Kopien per E-Mail.