Michael Haufe (TNO) wrote:
> Thomas 'PointedEars' Lahn wrote:
>> Michael Haufe (TNO) wrote:
>> > Thomas 'PointedEars' Lahn wrote:
>> >> Michael Haufe (TNO) wrote:
>> >> > So depending on your platform targets, there is a good chance you're
>> >> > going to be getting some contradictory information in some cases
>> >> > (keydown followed by a keypress and possibly by keyup somewhere in
>> >> > there in repetition)
>> >> Name one.
>> > <
https://bugzilla.mozilla.org/show_bug.cgi?id=602812>
>> There is nothing there that corroborates your belief.
>
> Platforms are listed in there as well as in the original link I posted
> earlier. What exactly are you trying to criticize here?
That you are jumping to conclusions, (unintentionally, I trust) spreading
FUD.
> You don't believe the events repeat as listed in the original MDN article?
No. First of all, I am trained in *scientific* thinking, so I am naturally
skeptic: I do not just believe, I demand *evidence* supporting statements.
Second, as a result, I *think* that statements made in such a way cannot be
a solid basis for design decisions. Third, my *tests* in
navigator.userAgent === "Mozilla/5.0 (X11; Linux x86_64; rv:38.0)
Gecko/20100101 Firefox/38.0 Iceweasel/38.1.0" (note the Gecko version),
using the test code I posted, do not confirm the statements: in all
instances, there is only one “keyup” event for such keys.
> Or you don't like that I generalized the MDN link to include the Shift key
> in the list of non-character items?
Once again, this is not personal; it does not matter whether *I* *like* it.
It was *fallacious*.
You have claimed “a good chance” that what you describe is going to happen.
Evidently it is not such, not even remotely.
> If you're criticizing the first, that's hard to believe.
How so? It is a wiki, not reference material written solely by Mozilla.org
developers or developers working for the Mozilla Corporation. It is peer-
reviewed, (which is good; although not on a regular basis, AFAIK, which is
not so good) but until that happened, anyone could have written any nonsense
there.
As you can see, I am using a rather old Firefox on GNU/Linux (due to
distribution limitations: I do not want systemd running on my computers) in
which I cannot confirm those claims.
It is possible that I do not meet the requirements of the (imprecisely
formulated) observations there: I am using Debian GNU/Linux, not Ubuntu
(which is Debian-based), so I am using (naturally) the GTK(+) variant of
Firefox (then rebranded by Debian as “Iceweasel” due to licensing issues,
but the relevant codebase should be the same), and I am running it from
KDE, not a GNOME-based desktop environment.
However, I find it more likely that the person writing this part of the
article (which would have been about 7 years ago; the history will tell for
sure) has encountered the edge-case bug fixed three years ago or earlier,
if that. (See below.)
> […] I know PPK has discovered inconsistencies in the shift key
> behavior in the past as well [1],
>
> [1] <
http://www.quirksmode.org/dom/events/keys.html>
How far in the past, and how detailed? You are wrong if you think that
descriptions like “Shift keys” in “FF 7.0 Win” are detailed enough findings.
It is curious that you do not realize that as the bug report that you
referred to shows it.
> so it isn't unreasonable to be conservative in this case in the absence of
> information about specific platform targets.
It is unreasonable in the absence of platform target information if the
versions in question have met their end-of-life long ago, and the browser
bugs in that regard, that existed only for a short period of time, have been
fixed long ago. For what we now know, it is possible that PPK has tested
those versions of Firefox, and only those, where the bug described in the
bug report existed.
Also, PPK does not say anything about “keyup” events repeating when a key is
held down. Was his testing insufficient, or is the MDN article section the
result of superficial testing? They cannot be both correct unless there
were edge-case bugs.
>> >> > Which means you are now looking at the keypress event. Luckily, the
>> >> > event that is raised has a property called "shiftKey" which you can
>> >> > interrogate.
>> >> The *proprietary/legacy* “keypress” event is not fired for
>> >> non-character
>> >> keys; never has been. This is how you can tell apart, for example,
>> >> the right arrow key ({keyCode: 39, charCode: 0}) and the apostrophe
>> >> key ({keyCode: 39, charCode: 39}}; on my laptop with Swiss German
>> >> keyboard layout, YMMV).
>> >
>> > See the above link
>>
>> BTDT. It says that *in Firefox*
>
> You said it's not fired, and never has been. The link contradicts that
> claim.
Edge-case bugs aside of course. You make it sound as if this had not been
an edge-case bug and it would be reasonable to be considered everywhere for
all eternity.
> […] You claimed:
>
> "The *proprietary/legacy* “keypress” event is not fired for non-character
> keys; never has been."
>
> Which is evidently not true, but when presented with reference you now no
> longer care? Seems like a bad faith criticism from where I'm sitting.
>
>> “Currently, neither modifier keys nor dead keys cause keypress event(s).”
>> (AISB)
>
> That's not what you said before. You've added the qualifier "Currently"
> where earlier you said "never".
I am well aware that the bug report disproves the “never has been” in my
statement. However, it does not disprove the argument as it was meant: This
behavior was not by design, it *was* a *bug*. It *existed* only on *one*
browser on *one* platform for a *short* period of time, a considerable time
ago. And it did not occur with the key in question.
> Can you summarize your criticism(s) into a single paragraph for clarity?
The claim made in MDN, which you are primarily basing your argument on, is
too vague to begin with. It is also specious: There never was a 9.4 version
of Ubuntu. Ubuntu versions are released semianually, where the major
version indicates the year, and the *two-digit* minor version indicates the
month of the release. There was a Ubuntu _9.04_ (“Jaunty Jackalope”)
released in 2009-04; it was not a Long Term Support release, so support for
it ended 2010-10-23 with Ubuntu 10.10 (“Maverick Meerkat”) [that was 6 to 7
years ago; nobody in their right mind should use that version anymore]. And
Ubuntu is particularly quick in adopting new Firefox versions.
I implore you to apply more critical thinking to *everything* that you read.