? ? Pending

User tests: Successful: Unsuccessful:

avatar dgt41
dgt41
25 Oct 2017

Pull Request for Issue #18199 (comment).

Summary of Changes

Whenever a field is rendered the HTML5 polyfill is injected and used. This is not performant and also the polyfill causes weird effects on modern browsers. So let's load it conditionally on for old IE 8.

Testing Instructions

Check #18199 (comment)
Apply the patch and check again, there shouldn't be a weird behaviour

Expected result

Everything works as expected

Actual result

Polyfill can cause weird behaviour hick ups on modern browsers

Documentation Changes Required

NONE

avatar joomla-cms-bot joomla-cms-bot - change - 25 Oct 2017
Category Layout Libraries Modules Front End
avatar dgt41 dgt41 - open - 25 Oct 2017
avatar dgt41 dgt41 - change - 25 Oct 2017
Status New Pending
avatar Quy
Quy - comment - 25 Oct 2017

Remove extra space after 9 in <!--[if lt IE 9 ].

19d1cb9 25 Oct 2017 avatar dgt41 CS
avatar dgt41 dgt41 - change - 25 Oct 2017
Labels Added: ?
avatar Quy
Quy - comment - 25 Oct 2017

It is still an issue with Firefox 56.0.1 on Windows 10. Cleared cache.

avatar mbabker
mbabker - comment - 25 Oct 2017

It's a browser bug. Non-Joomla project using number input fields, Firefox 56 on MacOS 10.12, set it as readonly and get the arrow controls there.

avatar Fedik
Fedik - comment - 25 Oct 2017

I would remove it at all, it is useless piece of code.
As far as I remember it only for "placeholder" fallback.

avatar dgt41
dgt41 - comment - 25 Oct 2017

@Fedik unfortunately it a bit more than placeholders:

		var attributes = [ 'required', 'pattern', 'placeholder', 'autofocus', 'formnovalidate' ],
			types = [ 'email', 'url', 'number', 'range' ],

But doing it this way it will only be loaded for IE8 so you should be good for most real use cases

avatar Fedik Fedik - test_item - 28 Oct 2017 - Tested successfully
avatar Fedik
Fedik - comment - 28 Oct 2017

I have tested this item successfully on 19d1cb9


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/18415.

avatar Quy Quy - test_item - 28 Oct 2017 - Tested successfully
avatar Quy
Quy - comment - 28 Oct 2017

I have tested this item successfully on 19d1cb9


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/18415.

avatar franz-wohlkoenig franz-wohlkoenig - change - 29 Oct 2017
Status Pending Ready to Commit
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 29 Oct 2017

RTC after two successful tests.

avatar mbabker mbabker - change - 1 Nov 2017
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2017-11-01 12:05:41
Closed_By mbabker
Labels Added: ?
avatar mbabker mbabker - close - 1 Nov 2017
avatar mbabker mbabker - merge - 1 Nov 2017
avatar Quy
Quy - comment - 6 Nov 2017

@mbabker Which is the best way to handle this browser bug...keep the type as number or revert the type to text for readonly fields?

avatar mbabker
mbabker - comment - 6 Nov 2017

Keep it as number. There is no point in penalizing other users because one implementation has a bug.

avatar Quy
Quy - comment - 6 Nov 2017

It shouldn't affect users since it is readonly other than displaying the arrow controls when it shouldn't in Firefox.

avatar mbabker
mbabker - comment - 6 Nov 2017

If it really becomes a major problem there are CSS tricks that can be used to hide them.

Add a Comment

Login with GitHub to post a comment