javascript - angular ng-required radio button not toggling required off in firefox 33, OK in chrome -
i trying toggle required attribute on radio button using angular show html5 popup.
i cannot following code function correctly in firefox 33. function correctly in chrome. required property being toggled via checkbox value, in firefox, when set false radio button still acts required , shows html5 required popup. see plnkr below example doesn't work me in ff 33.
<!doctype html> <html> <head> <script data-require="angular.js@*" data-semver="1.3.1" src="//code.angularjs.org/1.3.1/angular.js"></script> <link href="style.css" rel="stylesheet" /> <script src="script.js"></script> </head> <body ng-app="myapp"> <script> angular.module('myapp',[]) .controller('mycontroller',['$scope',function($scope) { $scope.foorequired=true; $scope.submitform = function() { $scope.submitmessage = "submitted"; } }]); </script> <form name="myform" ng-submit="submitform()" ng-controller="mycontroller"> <h1>required toggle in firefox 33 no work. ok in chrome</h1> <p>toggle required in firefox off, validation required still kick in? </p> <br/> <input type="radio" ng-required="foorequired" name="foo" ng-model="foo" ng-value="true" > true <input type="radio" ng-required="foorequired" name="foo" ng-model="foo" ng-value="false" > false <br/> <input type="checkbox" ng-model="foorequired"/>toggle required <button type="submit">submit</button> required? {{foorequired}} <br/> {{submitmessage}} </form> </body> </html>
http://plnkr.co/edit/tblm5kxb5dlp1hb8ta8u?p=preview
i opened ticket @ mozilla response angular might browser bug. https://bugzilla.mozilla.org/show_bug.cgi?id=1100535
this issue fixed in firefox 36+
Comments
Post a Comment