Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Firefox 57.0.1: forms-ext Datetimepicker [type="datetime-local"] broken #592

Open
someother1 opened this issue Nov 30, 2017 · 5 comments
Open

Comments

@someother1
Copy link

Since the Update of Firefox it seems not any more possible to instance / reinstance the datetimepicker.
There is also no error in the console..
Can someone confirm this issue?
Maybe there is a fix for this?

Kindly regards

@ManfredTremmel
Copy link

Problem also exists in Firefox 58. Linux, Mac or Windows doesn't matter.

@ManfredTremmel
Copy link

I've tried to analyze the problem, and it looks like Firefox >= 57 reports type of a datetime-local input element as text, so the detection fails and the input widget is not extended by webshim. You can test this with this simple html page:

<!DOCTYPE HTML>
<html>

	<head>
		<meta charset="utf-8">
		<title>input datetime-local wrong type demonstration</title>
	</head>

	<body>
		<input id="datetimepicker" type="datetime-local"/>
		<script>window.alert(document.getElementById('datetimepicker').type);</script>
	</body>
</html>

The alert should report "datetime-local", but it reports "text".

@ManfredTremmel
Copy link

What solves the problem: replace line 3610 in https://github.com/aFarkas/webshim/blob/gh-pages/js-webshim/dev/shims/combos/10.js
var type = $.prop(this, 'type');
with
var type = this.getAttribute('type');

@bzbarsky
Copy link

bzbarsky commented Feb 9, 2018

it looks like Firefox >= 57 reports type of a datetime-local input element as text

This is true for Firefox < 57 as well. And it's correct behavior per spec, since Firefox doesn't impement any non-text processing for those input types.

@ManfredTremmel
Copy link

Just done a view tests which type is reported

  • Firefox 52.6.0ESR -> text
  • Firefox 53.0.3 -> text
  • Firefox 54.0.1 -> text
  • Firefox 55.0.3 -> text
  • Firefox 56.0.2 -> text
  • Firefox 57.0.4 -> text
  • Firefox 58.0.2 -> text

You are right, it must be something else which causes the problem. What ever, I've done the changes in 10.js I've reported and it works. I've included the patched version in my project and Firefox 57 and 58 displays the datetime-local widget from webshim.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants