Skip to content
This repository has been archived by the owner on Feb 22, 2018. It is now read-only.

input[type="number"] does not work in Firefox when compiled to JavaScript #694

Closed
Anteru opened this issue Mar 9, 2014 · 10 comments
Closed

Comments

@Anteru
Copy link

Anteru commented Mar 9, 2014

What steps will reproduce the problem?

  1. Use the attached controller and HTML. Set angular to >= 0.9.8 and < 0.10.0.
  2. Run as JavaScript in Firefox
  3. Type in a number into the input field

What is the expected output? What do you see instead?
See the same number to the left. Instead, I see NaN on Firefox. Works in Chromium when compiled to JavaScript. Works fine with Dartium.

What version of the product are you using? On what operating system?
Dart 1.2 with Angular 0.9.10. OS is Ubuntu 13.10.

Dart:

import 'package:angular/angular.dart';

@NgController (selector: '[controller]', publishAs: 'ctrl')
class MyController
{
  num value;
}

void main() {
  ngBootstrap(module: new Module()..type(MyController));
}

HTML

<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <title>InputTest</title>
    <link rel="stylesheet" href="inputtest.css">
  </head>
  <body>
    <h1>InputTest</h1>

    <div controller>
      <span>{{ctrl.value}}</span>
      <input type="number" ng-model="ctrl.value">
    </div>

    <script src="packages/shadow_dom/shadow_dom.min.js"></script>
    <script type="application/dart" src="inputtest.dart"></script>
    <script src="packages/browser/dart.js"></script>
  </body>
</html>
@Anteru
Copy link
Author

Anteru commented Mar 9, 2014

@Anteru
Copy link
Author

Anteru commented Mar 9, 2014

@Anteru
Copy link
Author

Anteru commented Mar 10, 2014

Doesn't happen with Firefox 29 Aurora. Does happen with Firefox 28, though.

@jbdeboer jbdeboer changed the title input[type="number"] does not work when compiled to JavaScript input[type="number"] does not work in Firefox when compiled to JavaScript Mar 26, 2014
@jbdeboer
Copy link
Contributor

I see the bug with Firefox.

@Anteru
Copy link
Author

Anteru commented Mar 26, 2014

Excellent :) Any way to work around this? It currently prevents me from deploying an application on IE/Firefox, and even if Firefox 29 fixes this, I can't really wait for a new IE release :/

@jbdeboer
Copy link
Contributor

Not sure, yet. I am still debugging it, but will report back when I know more.

#801 will make debugging much easier.

@Anteru
Copy link
Author

Anteru commented Mar 26, 2014

Thanks, much appreciated.

@jbdeboer
Copy link
Contributor

Finally got the Firefox tests running and I can see this error in our unit tests. Should be fairly straight-forward from here.

@jbdeboer
Copy link
Contributor

This is due to http://dartbug.com/15788

@Anteru
Copy link
Author

Anteru commented Mar 29, 2014

Thanks, that did the trick. Deploying works fine on IE11 and FF28 now!

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

No branches or pull requests

2 participants