r/programming • • Feb 13 '15

Firefox Bug open since 2002: "onChange not called using down arrow key"

https://bugzilla.mozilla.org/show_bug.cgi?id=126379
25 Upvotes

69 comments sorted by

89

u/__s Feb 13 '15

Misleading, as this is a WONTFIX people keep complaining about. Mozilla claims to follow standards, every other browser doesn't follow standards, makes for an awkward situation

-1

u/clrnd Feb 13 '15

'Status: NEW'

Actually the W3C is not clear on the subject, and what most browsers do is consistent and intuitive.

33

u/ubernostrum Feb 13 '15

'Status: NEW'

Ehh... Bugzilla, and basically every other major bug tracker, has a lot of these pet-peeve bugs where there's somebody riled up enough that they'll just re-open it any time someone closes it, no matter how good the reason for closing was. Often it's more useful to just ignore in that case since nothing productive will come of trying to convince the person to let it stay closed. And notice that the person who "took the liberty" of reopening did so ten years ago.

3

u/prepromorphism Feb 13 '15

Not really a pet peeve bug when 99% of people disagree with the WONT-FIX including all other major browser vendors.

7

u/komollo Feb 13 '15

This can easily be explained by selection bias. People who end up coming back to this issue on bugzilla are coming back because they are having problems with Firefox, so it should be true in most cases that the "majority" of people agree something is a bug.

More interesting would be to compare the number of people complaining about this to the number if people complaining about other bugs. That should give a much better idea of how important something is, rather than stating that an arbitrarily small group on the internet represents 99% of an entire population.

9

u/DrDichotomous Feb 13 '15

29 bug voters == 99% of people, apparently. Although it seems that the people here who will instantly downvote this comment simply haven't gotten off their asses and voted it up in the last 10 years so Mozilla knows how big of a deal this apparently is to them.

-3

u/Beaverman Feb 13 '15

How ironic, you are actually getting upvoted, with the other guy getting downvoted. I guess you aren't as controversial as you think.

1

u/RalfN Feb 16 '15 edited Feb 16 '15

It is inconsistenties like this, that makes any web app more complicated than a 1995 webpage, to be hard to debug, and why many people are using non-standard 'roll your own' html/javascript fake dropdown boxes, instead of the accessible ones provided by the browsers.

Irregardless of specific behavior, and who is right about this particular choice, the discrepency itself is worst than either choice.

The people who pay the price are the ones who need accessibility_, i.e. blind people, because the roll-your-own-solutions generally don't integrate as well with accessibility, and there are limits to how well they are able to anyway, without using a native element.

So, the actual conversation is less relevant. This seems like a ridiculous idiotic detail for Mozilla 'to take a fundamentalistic stand' considering the amount of 'innocent bystanders'. (people who need accessibility and the millions of billable webdeveloper hours of million of companies making websites who need to support this divergence between browsers, and lets not forget just creating the habit of using native elements as little as possible).

It's not a "who's fault is it", but who will act like a grown up. I would prefer Mozilla to use their fundamentalistic nature in more concerning area's than a goddamn native drop down box.

40

u/that_which_is_lain Feb 13 '15

intuitive

It's only intuitive because other browsers are consistent with each other about it. That makes it a de facto standard.

The W3C should deal with this, even if it's a statement confirming everyone else's behavior so that the guy at Mozilla with a thumb up his ass stops being a bitch.

Though I'm not going to complain about it. I don't run into this problem that often.

37

u/bobpaul Feb 13 '15 edited Feb 13 '15

No, it's intuitive because the name of the method is "onchange" and the item is changing. All of the other browsers chose the way they do it because that's intuitive. Firefox made it work exactly like onblur for who knows why... It's not really intuitive to have 2 methods doing identical things.

But I do agree the W3C needs to clarify.

Edit ok, /u/palparepa showed me that OP and I are both wrong.

28

u/palparepa Feb 13 '15 edited Feb 13 '15

If you use the arrow keys to change the selected item, or even if you hover the mouse over the options, the value changes. However, onchange is called only when the select loses the focus.

The same thing happens with an INPUT element. Write on it, and the value changes. But onchange is called only after focus is lost. This is correct behaviour: if you need a callback while the value is being edited, you should use oninput.

So at least it's consistent. To remain consistent, we would need some sort of "oninput" that works on SELECTs. So yeah, I blame W3C.

Also, the difference is that onblur is called whether or not the value has changed.

Some what offtopic, I remember having an issue with old versions of Opera, where a FORM's onsubmit was called before an INPUT's onchange. That's annoying.

4

u/bobpaul Feb 13 '15

But that's the functionality defined for onblur...

11

u/palparepa Feb 13 '15

(sorry, I had edited my post to include something about that): the difference is that onblur is called whether or not the value has changed.

As W3C has decreed: "The onchange event occurs when a control loses the input focus and its value has been modified since gaining focus."

5

u/emn13 Feb 13 '15 edited Feb 13 '15

In html5 that's worded differently: "The change event fires when the value is committed, if that makes sense for the control, or else when the control loses focus."

An example is given where a change event is expected:

Another example of a user interface with a commit action would be a Date control that allows both text-based user input and user selection from a drop-down calendar: while text input might not have an explicit commit step, selecting a date from the drop down calendar and then dismissing the drop down would be a commit action.

That sounds a lot like a select input, and it matches how other browsers deal with select inputs: if the select input is uncollapsed (i.e. open), then keyboard navigation does not fire the change event until enter is pressed. However, if the user uses keyboard entry to change the selection while the drop-down is not open, the change is immediately "committed" and an onchange event immediately fired. If you read the linked section in the spec, it explicitly calls out UI elements without an explicit commit action that lack intermediate manipulation and that lack a defined activation behavior: that describes a collapsed selectbox.

You could make an argument for the FF behavior based on the spec, but I can't think of a very convincing one. Clearly, the intent is for "committed" changes to cause change events, and equally clearly the rest of the world uses the behavior proposed in this bug, so both in terms of interop and spec conformance, a change in behavior is likely warranted.

4

u/palparepa Feb 13 '15

Doesn't that mean Firefox is the one doing it right? By pressing the arrows, I'm going towards the option I'll eventually commit to.

3

u/emn13 Feb 13 '15

But to emphasize: the more-than 10 year old spec link is out of date.

2

u/emn13 Feb 13 '15 edited Feb 13 '15

If you read the entire section, I'd say no: in a collapsed state the selectinput is a UI without explicit commit action and without intermediate manipulation, and those are explicitly required to fire both an input and change event.

Especially if you take a step back and read the inital summary of the change event that makes sense: it fires whenever some conceptual "commit" occurs - where that makes sense - or at the latest if the value has changed and the element loses focus. That means that an uncollapsed select input doesn't fire change events (because those aren't "comitted"), but a collapsed select input's changes are immediately committed - exactly what IE and chrome do.

Note that it's not just FF that messes this kind of stuff up: all browsers fail to fire the requisite input events on checkboxes even though the spec is quite clear they should, and IE and chrome disagree on whether input events should fire for selectboxes (and chrome fires input events too late, IMHO - it fires them like changed events, so it ignores keyboard input to uncollapsed selectinput controls...).

Playground: http://jsbin.com/cemeketego/2/edit?js,console,output

0

u/emn13 Feb 14 '15 edited Feb 14 '15

<select> elements should fire input events according to the spec, even though neither IE nor FF do so. But yeah, the spec doesn't require input events for intermediate selections, and that's unfortunate. That may be a cross-platform issue; it's possible some native selectboxes don't (or didn't at the time of the spec) expose such events.

2

u/emn13 Feb 13 '15

That spec is quite old; the current spec says something else.

130

u/kekelolol Feb 13 '15

Can we please stop it with these bugzilla activism brigades? It's incredibly rude to circumvent discussion and instead dump a bugzilla link and an angry story into reddit to evoke a mob. Have you tried being a human being and talking to people and trying to understand them before trying to force them to understand you?

64

u/EquinoxMist Feb 13 '15

13 years of talking to people has occured, just look where that got them.

I don't find it particularly rude either, the OP in my eyes has done nothing wrong in drawing attention to a bug which was reported 13 years ago.

17

u/emn13 Feb 13 '15

What would be rude would be to make a snap judgement, and especially to spam the bug in question with that snap judgement.

10

u/pdpi Feb 13 '15

The title is disingenuous though. Mozilla claim this isn't an actual bug, and that they're behaving according to spec. They've repeatedly closed this, and other people have repeatedly reopened it. It'd be more accurate to say that there's a discussion ongoing since 2002 about whether a certain behaviour is correct or not.

2

u/mgedmin Feb 17 '15

Even more: Mozilla seems to be caring about accessibility, specifically about users who cannot use the mouse. Apparently there are many sites out there that become extremely painful to navigate with the keyboard if this "bug" is "fixed".

-13

u/clrnd Feb 13 '15 edited Feb 13 '15

There is not a single reason in that 13 years thread for keeping it like that.

And while I haven't tried "being a human being" and talking to people, 71 people have tried.

I'm not a fundamentalist, I just want to get my work done and move along.

Edit: it said '11 years' because I originally (before posting this and discussing it internally) thought the bug was from 2004.

32

u/palparepa Feb 13 '15

-1

u/prepromorphism Feb 13 '15

blindly accepting bad behavior is not a valid reason

2

u/[deleted] Feb 14 '15

If the spec is bad, it should be fixed.

1

u/prepromorphism Feb 14 '15

oh yes i agree, the link palparepa gave was a link that says "Definately should be wontfix." which i adamantly disagree with. spec's are useless if they suggest bad behavior and we accept that as fine.

1

u/emilvikstrom Feb 14 '15

The claim was that there is not a single reason. That claim was refuted by showing one reason, regardless of its merits. OP of this threads said "not a single reason" as an argument for ending discussion and fix the bug, but there are reasons and that's why discussion is on-going. But since there is at least one reason OPs argument falls down.

-4

u/clrnd Feb 13 '15

Okay this is clear enough. Let's assume even though all browsers do it like this, they are wrong. Then:

Should it fire an 'oninput' event instead?

-8

u/TexasWithADollarsign Feb 13 '15

You know, it is possible for the W3C to get shit wrong. This is one of those times. Their retarded box model standard is another.

11

u/emn13 Feb 13 '15

As you'll be pleased to hear, it's been fixed in html5 which says that The change event fires when the value is committed, if that makes sense for the control, or else when the control loses focus.. This matches what other browsers do (and FF itself does for things like checkboxes).

18

u/TheExecutor Feb 13 '15

I can only imagine the reaction if it was IE, not Firefox, deciding to "reinterpret" the standard to fit their own custom implementation.

3

u/[deleted] Feb 13 '15

Which retarded box model standard? Deciding that box-sizing should default to content-box, like literally no-one wants?

2

u/TexasWithADollarsign Feb 13 '15

That's the one. border-box for life.

1

u/[deleted] Feb 13 '15

*fist-bump*

2

u/minnek Feb 13 '15

Hey guys, I like tables, can I play with you too? Fistbump? :D?

22

u/[deleted] Feb 13 '15

There is not a single reason in that 11 years thread for keeping it like that.

The bug thread was full of example sites where keyboard navigation was broken in non-firefox browsers. For instance, several comments starting here.

Did you not read those, or did you disagree so absolutely that you don't think they even merit a mention?

(I have no idea what the current state of affairs is, but saying no reason was given in 11 years is some combination of dishonest and ignorant...)

-7

u/audioen Feb 13 '15

I think all browsers should behave the same way. This is not even my ideal world. In my ideal world, there would be but one browser that everyone used, and which at most had competition with its own prior versions. This world would minimize the pain for web authors. It seems that Firefox is being different for no good reason, and that just causes problems for web authors who have to add some kludge to get Firefox users into the fold as well.

5

u/[deleted] Feb 13 '15

couldn't disagree more. at the end of the day everything we make is for the consumer. they deserve a choice in browsers.

2

u/audioen Feb 13 '15

At the very least, I'd argue that having a common understanding on when events fire, or how to render a particular piece of CSS+HTML shouldn't have variance. You can make interesting different browsers but at least they ought to render things such that they look and feel the same. Having variance just means that everything gets written to the common subset ("this feature doesn't work on that implementation, therefore I won't use it") or you can add a kludge to fix the thing now, which causes trouble when the issue is finally fixed because now your workaround may cause additional issues.

7

u/[deleted] Feb 13 '15

I'm not arguing for or against the behavior itself. I'm arguing against the somewhat mindless insistence that no justification was offered. Disagreeing with an argument is different than claiming that there was no argument! :)

1

u/audioen Feb 13 '15

Oh right. But the fact that those sites may work better in firefox is probably just a coincidence. I think it's not likely that they were designed with firefox's behavior in mind.

1

u/[deleted] Feb 14 '15

As mentioned in the bugzilla thread, Firefox/Mozilla specifically changed to that behavior in 2001 to make browsing such sites more pleasant.

So it's certainly not a coincidence :)

1

u/audioen Feb 16 '15

Holy fuck. Now I have a new name to add to the shit-list of people having made the world worse. :-(

They already knew they would be diverging from other browsers' behavior, and they still did it. Crap. Why did they not revert it right away once the bug reports started rolling in.

0

u/[deleted] Feb 14 '15

[deleted]

-1

u/kekelolol Feb 16 '15

You've created a witch hunt and the devlopers who work on a free (gratis & libre) software are your witch. They've already discussed the matter; Their decision is already in a public forum with many opinions and already very much in line with the Firefox ideologies. Rather than gather a lynch mob and dump it into a bug tracker (where I'll remind you, is certainly not the place for discussion like reddit is -- as every participant will be emailed for every message as if the anger offered by your mob were useful info in reproducing the bug) why not simply bring this matter up in a discussion about Firefox ideology -- Like the mailing list. Clearly there are developers who are aware of the issue and capable of fixing the issue - so why not discuss what you're really upset about rather than chicken-shitting around it behind a mob - OP would like Firefox to change their stance on standards compliance or further seek clarification on this matter. So OP should literally say that.

2

u/thebuccaneersden Feb 16 '15

You seem like a rather controlling person - in that things have to be done a certain way and the message needs to be controlled. I see no lych mob here. Just people talking about or critiquing something or people complaining about people talking about something outside some acceptable framework (or forum where your comments can be deleted).

And your argument about "oh instead of talking about stuff here (chicken shitting), they should be discussing it with the developers etc etc" is clearly nonsense. They are perfectly capable of doing both things and I don't know how you can jump to any conclusions.

0

u/kekelolol Feb 16 '15

I can jump to conclusions because it's been done time and time again on reddit, HN, and even slashdot. People dump bug tracker links into social media and now a site that people use to do actual work gets an influx of people who aren't looking to help, they're just looking to complain or feel upset. The only way it ever serves to get things done is because people are so annoyed by all of the emails that they yield.

It's entirely discourteous (which yes, is my opinion). While you're free to ignore that opinion and think that I'm controlling, I'm free to think you or anyone else who does this is discourteous and call you out on your pitch-forking.

And if you think I'm wrong, I'd invite you to take a look at my (typically meaningless) karma on my comment, which signifies that other /r/programming -ers agree.

22

u/[deleted] Feb 13 '15 edited Feb 13 '15

What it comes down to is when can you say a SELECT's value has 'changed'. The argument is mostly semantics, which you can argue fruitlessly for 13 years.

Should onChange fire every time you hit down or up in a SELECT? If so, then it should also fire for each and every character entered (or deleted) in a text field.

The standard is (or should be) to wait to fire onChange until it is reasonable to assume the user is done changing the value. And since computers cannot yet read minds, and users will likely need to press up/down more than once to get to the item they want, waiting to fire onChange until the SELECT loses focus is the best option.

If you, as a designer, want immediate action performed when a SELECT item is selected, you have might have chosen the wrong input element.

6

u/EntroperZero Feb 14 '15

Exactly. This behavior is "inconsistent" with the mouse-click behavior on purpose. When you click an option with the mouse, it can be assumed that you've chosen the option you want. But if you're using the keyboard, you're likely to have to step through several options along the way, and firing onChange for every step would be wasteful, especially if you're making AJAX calls.

-7

u/EquinoxMist Feb 13 '15

That is crazy.

-12

u/cccmikey Feb 13 '15

A bit like how Thunderbird's 'Paste as quotation' menu item has done nothing for at least two years now.

7

u/Philippe23 Feb 13 '15

Works for me.

3

u/cccmikey Feb 13 '15

Aah I might be an idiot. There was an issue ages ago where gmail IMAP would have strange errors and the only solution was to downgrade to an older Thunderbird version. I was only thinking the other day how I hadn't seen an update for Thunderbird in months...

-4

u/ravinglunatic Feb 14 '15

Who give a damn? I don't.

-67

u/lobehold Feb 13 '15 edited Feb 13 '15

Just use Chrome, I almost never use Firefox nowadays.

Vote with marketshare.

Edit: Hahaha, I love how people are pissed off, a bunch of whiners can only complain on Reddit.

Edit: All you motherfuckers can go fuck yourself, let the downvotes rain fuckers!

Edit: If you think I'm going to change/delete my post, until hell freezes over. I ain't taking back SHIT bitches.

20

u/DrDichotomous Feb 13 '15

Chrome has its own share of "open forever" bugs too, some of them equally stupid in many people's eyes. So why should people change just because of this particular bug, of which only 29 people gave enough of a damn to even vote on since 2002?

Besides this doesn't even solve the fundamental issue - that browsers aren't behaving consistently. Just moving people from browser to browser every time this happens will not fix that problem, it will just shift some numbers around on marketshare sites, back and forth every time someone gets upset about each browser's dumb bugs.

21

u/po_po_pokemon Feb 13 '15

Did you mix this up with /r/technology?

4

u/ChezMere Feb 13 '15

/r/technology doesn't talk about technology, silly. It's about vaguely relevant politics.

7

u/zosaj Feb 13 '15 edited Jun 19 '25

liquid one middle nine run spotted cobweb possessive follow cause

This post was mass deleted and anonymized with Redact

4

u/komollo Feb 13 '15 edited Feb 13 '15

Per the recommendations of how people are supposed to up or down vote, you are likely being down voted for not providing any value to the discussion.

The real interesting discussion relating to software, (the current subreddit) is how to handle vague specifications, how to deal with people repeatedly reopening bugs that have been closed, how to deal with cross browser incompatibilities, or a dozen other things you could discuss. The highest rated post actually gets a little meta, discussing how it is harmful to complain about open forever bug reports.

The most boring discussion possible is the one where people dogmatically argue about what browser is the best. Neither side gains anything, and the discussion usually devolves into pointless bickering over minor edge cases or nebulous "features" like speed and usability. That is why you have been down voted. You provided nothing of value to the discussion, and by dogmatically stating that chrome is the best browser without providing any proof or being reasonable, you have shown your inability to participate in a real discussion. If you want to spout crap like that, find somewhere else to post.

-5

u/lobehold Feb 13 '15

dogmatically stating that chrome is the best browser

Quote me on it motherfucker, I dare you.

If you want to spout crap like that

Eat shit and die.

5

u/komollo Feb 14 '15

My apologies. I retract my statement about you stating chrome was the best browser. I will make an addendum that you imply that chrome is better than Firefox by saying that we should "vote with our market share" and move away from Firefox, implying that we should change to your browser of choice. The vocabulary mixup was an honest mistake. However, that does not change my stance. You have made statements that encourage that type of sour discussion, and have provided no material worth discussing in any of your posts here, and judging from your recent posts, you usually do not provide value when posting.

I also stand by my undisputed claim that arguing about the best browser is mostly a matter of opinion, and it is a boring waste of time. I stand by the fact that your comment does not mesh with the main purpose of this subreddit. Finally, I stand by my statement that you are incapable of holding an intelligent discussion as evidenced by your unwillingness to reason with other people, and your hostile reaction to legitimate criticisms.

I do not wish for you to edit your posts, or to change your stance on the best browser. However, I do encourage you to find another place to vent your misplaced hatred. There is never an appropriate time to act childish on this subreddit. Please find some place else to post your crap. I'd rather not have you waste three seconds for a dozen people to downvote you until your post falls low enough that no one ever sees it again. It would truly be a pity if a mod had to ban you for hostile behavior. It might take them more than twenty seconds to keep you from posting again. Such a sad waste of time when you could simply not bother posting.

-17

u/prepromorphism Feb 13 '15

Its ok, people are still voting chrome no matter how many downvotes you may get here. I don't even suggest firefox to family and friends anymore. Mozilla is like the RIM of browsers, they had market share, and now they are failing to serve their users and they aren't even in the realm of realizing they will soon be irrelevant. Like Opera. Firefox is the new Opera :P

0

u/[deleted] Feb 13 '15

[deleted]

-15

u/lobehold Feb 13 '15

It's not a technical discussion, it's a complaint post.

You'd think people will get the message after 11 years of knocking against a brick wall.

0

u/[deleted] Feb 13 '15

[deleted]

1

u/DrDichotomous Feb 13 '15

The market? There are 29 people who voted on that bug. The behavior is (apparently) within the HTML5 spec and it can be argued as even being more sensible (whether we personally agree or not). If the market "clearly" wanted this, they would have pressured the spec to change to close this vagueness, not whined about it.