johannesjo / ng-fab-form

Convenient forms for Angular with no extra markup? Fabulous!
https://johannesjo.github.io/ng-fab-form
MIT License
172 stars 25 forks source link

setAsteriskForRequiredLabel doesn't work in Firefox 37.0.1 #62

Closed emasch closed 9 years ago

emasch commented 9 years ago

When I activate setAsteriskForRequiredLabel in Firefox 37.0.1 I got the following Error:

Error: label.innerText is undefined
setAsteriskForLabel@http://localhost:8082/portal/static/bower_components/ng-fab-form/dist/ng-fab-form.js:459:1
ngFabFormCycle@http://localhost:8082/portal/static/bower_components/ng-fab-form/dist/ng-fab-form.js:525:29
init/<@http://localhost:8082/portal/static/bower_components/ng-fab-form/dist/ng-fab-form.js:556:33
timeout/timeoutId<@http://localhost:8082/portal/static/bower_components/angular/angular.js:16223:28
completeOutstandingRequest@http://localhost:8082/portal/static/bower_components/angular/angular.js:4905:7
Browser/self.defer/timeoutId<@http://localhost:8082/portal/static/bower_components/angular/angular.js:5285:7

http://localhost:8082/portal/static/bower_components/angular/angular.js
Line 11607

When I use the IE, it works fine.

johannesjo commented 9 years ago

Thank you very much for reporting the issue. Could you by any chance also provide the markup you're using for you form?

emasch commented 9 years ago

I use the following markup:

<form class="form" name="form" ng-submit="register()">
    <div class="form-group">
        <label for="username">Username</label>
        <input type="text" id="username" name="username" class="form-control" ng-model="registrationForm.useraccount.username" required autofocus username-validator />
    </div>
</form>
johannesjo commented 9 years ago

Thanks. I`ll look into it. It's probably related to how document.querrySelector works cross browser.

johannesjo commented 9 years ago

This should be fixed, but travis is down for now. I'll merge the fix into master once it is up and running again. Thanks again for reporting the issue!