Page MenuHomePhabricator

IE11: dsk lg PTF opens immediately on banner load w/o amount selection
Closed, ResolvedPublic

Description

In Internet Explorer 11, in various non-English languages (for example, huHU, heIL), the pay the fee toggle option expands as soon as the banner loads. Default behavior in dsk lg is for ptf to remain hidden until an amount is selected.

The Donate ## with legend script also runs immediately, display a value of 0.

Event Timeline

It appears that something is triggering the input event on #frb-amt-other-input and hence the frb.updateFeeDisplay() function. I haven't figured out why this would happen though, or why it's only for certain languages.

This is still an issue for IE11, and now it triggers the inline error messages like "Select an amount" too. Happening at least in German, haven't figured out which other languages (but not English)

e.g. https://de.wikipedia.org/wiki/NASA?banner=B1819_0701_mlWW_dsk_p1_lg_template&force=1&country=AT

Doesn't seem to have been fixed in the recent re-write

Ah ha, this looks like it could be the problem: https://stackoverflow.com/questions/33320572/internet-explorer-11-erroneously-triggers-input-event-immediately

There is an open bug regarding this problem: Input elements with unicode entity character values cause "oninput" events to be fired on page load

(sadly the link to the bug report is dead)

This is only happening for languages where the "Other" placeholder contains a non-ASCII character. It also explains why it doesn't occur on the other banner types (dsk sm etc) because their Other input does not use a placeholder.

Now to figure out a workaround...

Fixed with this change: https://meta.wikimedia.org/w/index.php?title=MediaWiki%3ACentralnotice-template-B1920_0301_mlWW_dsk_p1_lg_cnt&type=revision&diff=19852336&oldid=19849027

If the input has a value of "", bail out of checking. We still have another handler for when the Other input gets focused, which will work correctly.

Nice fix @Pcoombe, I remember us first catching that issue in the last bundle QA; it's nice to see stackoverflow confirm the ie11 issue.