aboutsummaryrefslogtreecommitdiffstats
path: root/src/ng/directive/input.js
AgeCommit message (Collapse)Author
2014-03-24fix(input): don't perform HTML5 validation on updated model-valueg3_v1_2Caitlin Potter
Running html5-validation immediately after model-value is updated is incorrect, because the view has not updated, and HTML5 constraint validation has not adjusted. Closes #6796 Closes #6806
2014-02-28docs(forms): generated CSS classes for forms and inputs must have a ng prefixMatias Niemelä
2014-02-28docs(input): update $parsers NgModelController docJason Winnebeck
Make it clear that the result of the $parsers pipeline is what goes to the model value. Closes #5708
2014-02-28feat($animate): animate dirty, pristine, valid, invalid for form/fieldsYves Brissaud
Add css animations when form or field status change to/from dirty, pristine, valid or invalid. This works like animation system present with ngClass, ngShow, etc. Closes #5378
2014-02-21fix(input): use ValidityState to determine validityCaitlin Potter
In browsers where HTML5 constraint validation is (partially) implemented, an invalid number entered into an input[type=number] (for example) input element would be visible to the script context as the empty string. When the required or ngRequired attributes are not used, this results in the invalid state of the input being ignored and considered valid. To address this, a validator which considers the state of the HTML5 ValidityState object is used when available. Closes #4293 Closes #2144 Closes #4857 Closes #5120 Closes #4945 Closes #5500 Closes #5944
2014-02-18style: remove ws and enfore no-trailing-ws jscs ruleIgor Minar
2014-02-16docs(NgModelController): don't run contenteditable example on FFPeter Bacon Darwin
2014-02-16docs(*): fix jshint issues in examplesPeter Bacon Darwin
2014-02-16chore(e2etests): fix a browser check which was actually assigning the parameterJulie
2014-02-16docs(content): fix bad linksPeter Bacon Darwin
2014-02-16test(docs-app-e2e): refactor test inline with new docs appPeter Bacon Darwin
The links to code elements have now changed: api/ng.directive:ngClick -> api/ng/directive/ngClick. Examples now run inside iframes, so we need to instruct Protractor to switch to the example iframe.
2014-02-16chore(protractor tests): fix up e2e testsJulie
2014-02-16chore(protractor-generator): add dgeni processor for protractorJulie
2014-02-16docs(bike-shed-migration): fix invalid </file name=""> HTML in examplesPeter Bacon Darwin
2014-02-16docs(bike-shed-migration): let markdown deal with extenal linksPeter Bacon Darwin
It is problematic to use {@link} tags with external links because the markdown parser converts them to links for us before we parse the @links. This means that the following tag: ``` {@link http://www.google.com Google} ``` get converted to: ``` {@link <a href="http://www.google.com/"></a> Google} ``` Our {@link} parser then converts this to: ``` <a href="<a">&lt;</a>href="http://www.google.com/"></a> Google} ``` which is clearly a mess. The best solution is not to use {@link} tags for external links and just use the standard markdown syntax: ``` [Google](http://www.google.com) ``` In the long run, we could look into configuring or modifying `marked` not to convert these external links or we could provide a "pre-parser" processor that dealt with such links before `marked` gets its hands on it.
2014-02-16docs(bike-shed-migration): convert <doc:...> examples to <example>...Peter Bacon Darwin
2014-02-16docs(all): convert <pre>/</pre> snippets to GFM snippetsCaitlin Potter
2014-02-16docs(bike-shed-migration): convert doctype and namesPeter Bacon Darwin
2014-02-13fix(input): don't apply textInput to <input type="file">Tim Whitbeck
textInput shouldn't be applied to file inputs to ease writing of custom file input directives. This change prevents file inputs from instantiating the text input parser/formatter pipelines. Closes #6247 Closes #6231
2014-02-12fix(input): setViewValue on compositionendCaitlin Potter
Because of a4e6d962, model is not updated on input/change between the compositionstart and compositionend events. Unfortunately, the compositionend event does not always happen prior to an input/change event. This changeset calls the listener function to update the model after a compositionend event is received. Closes #6058 Closes #5433
2014-02-12docs(input): document NgModelController.$isEmpty parameters / return valueMathieu Tricoire
Closes #6224
2014-02-05chore(testing): run end to end tests on firefox and safari as well as chromeJulie
Update the Travis and Jenkins configs to run protractor tests on Safari and Firefox as well, and make the Travis tests run output XML and turn off color. Fix tests which were failing in Firefox due to clear() not working as expected. Fix tests which were failing in Safari due to SafariDriver not understanding the minus key, and disable tests which SafariDriver has no support for.
2014-01-28test(docs): convert example end to end doc tests from scenario runner to ↵Julie
protractor Thanks to jeffbcross, petebacondarwin, btford, jdeboer, tbosch for contributions! Closes #6023
2014-01-21fix(input): use Chromium's email validation regexpCaitlin Potter
This change uses the regexp from Chromium/Blink to validate emails, and corrects an error in the validation engine, which previously considered an invalid email to be valid. Additionally, the regexp was invalidating emails with capital letters, however this is not the behaviour recomended in the spec, or implemented in Chromium. Closes #5899 Closes #5924
2014-01-17docs(input): document ngValue directiveAbdessamad Idrissi
Extend the example with ng-value showing how to deal with default checked radio boxes. Closes #5654
2014-01-17docs(ngChange): clarify difference between ng-change DOM change eventAndreas Gruenbacher
The ng-change event triggers immediately, which makes a difference for text input fields and text areas, where the JavaScript onchange event would only be called at the end of the change. Closes #5640
2014-01-06refactor(input): wrapped validation logic in helper functionBen Wiklund
Closes #5643
2013-12-31fix(input): use apply on change event only when one isn't already in progressIgor Minar
Closes #5293
2013-12-30fix(input): prevent double $digest when using jQuery trigger.Michał Gołębiowski
If an event was performed natively, jQuery sets the isTrigger property. When triggering event manually, the field is not present. Manually triggered events are performed synchronously which causes the "$digest already in progress" error. Closes #5293
2013-12-18fix(input): do not hold input for composition on androidChia-liang Kao
Workaround for chrome for android until #2129 is ready. Closes #5308, #5323
2013-12-09docs(input): remove redundant closing span tagmiknsh5
Closes #5257
2013-12-04fix(input): ensure ngModelWatch() triggers second digest pass when appropriateDaniel Tabuenca
Due to an earlier change, ngModelWatch() no longer returns a value to the caller. This means the digest loop has no way to tell if the watch actually modified anything and so can not schedule another pass. This means any watches that watch form or model controller changes (e.g. watches on form.$valid) that are scheduled prior to an ngModelWatch() will not be able to see any changes made therin. This commit fixes this behavior by returning the latest evaluated ng-model value. Closes #5258 Closes #5282
2013-12-04docs(input): remove deprecated isolated scope pitfallJulien Bouquillon
The 1.2 release fixed the documented pitfall at 909cabd36d779598763cc358979ecd85bb40d4d7 by isolating only the isolated directive's scope. Closes #5179
2013-11-22fix(input): Support form auto complete on modern browserTobias Bosch
Although modern browser support the "input" event, they still only fire the "change" event when they auto complete form elements other than the currently selected one. Related to #1460
2013-11-21feat(input): hold listener during text compositionChia-liang Kao
When composing text in CJKV, intermediate buffer for unfinished text should not be updating the bound scope variables. Closes #4684
2013-11-14docs(NgModelController): document `$viewChangeListeners` propertyCaitlin Potter
Closes #4948
2013-11-14docs(NgModelController): clarify documentation of `$setViewValue`Mathis Hofer
$setViewValue does not really "Read a value from view". It should be called to trigger the ngModel to be updated when the value in the view changes. Closes #4907
2013-11-04docs(input): fix typoTim Graham
Closes #4734
2013-11-04fix(ngModel): deregister from the form on scope not DOM destructionIgor Minar
Due to animations, DOM might get destroyed much later than scope and so the element $destroy event might get fired outside of $digest, which causes changes to the validation model go unobserved until the next digest. By deregistering on scope event, the deregistration always happens in $digest and the form validation model changes will be observed. Closes #4226 Closes #4779
2013-11-04style: remove wsIgor Minar
2013-10-24docs(ngModelController): $parent can help isolate scope directivesbasarat
2013-10-24fix(input): keep track of min/max attars on-the-flyDmitry Shirokov
Now input[type=button] keeps track of both min and max attrs even if they change over time.
2013-10-22style: make jshint happyVojta Jina
2013-10-18docs: correct broken linksVojta Jina
This also contains some whitespace corrections by my editor.
2013-10-07fix(input): `false` is no longer an empty value by defaultPete Bacon Darwin
`checkboxInputType` and `ngList` directives need to have special logic for whether they are empty or not. Previously this had been hard coded into their own directives or the `ngRequired` directive. This made it difficult to handle these special cases. This change factors out the question of whether an input is empty into a method `$isEmpty` on the `ngModelController`. The `ngRequired` directive now uses this method when testing for validity and directives, such as `checkbox` or `ngList` can override it to apply logic specific to their needs. Closes #3490, #3658, #2594
2013-10-07docs(ngModel): fix grammar and improve clarityDave Peticolas
Closes #4291
2013-10-07docs(ngValue): add docs for ngValue directiveBrian Ford
Closes #4267
2013-10-05docs(ngList): improve grammar and clarityDave Peticolas
2013-10-03fix($compile): fix (reverse) directive postLink fn execution orderIgor Minar
previously the compile/link fns executed in this order controlled via priority: - CompilePriorityHigh, CompilePriorityMedium, CompilePriorityLow - PreLinkPriorityHigh, PreLinkPriorityMedium, PreLinkPriorityLow - link children - PostLinkPriorityHigh, PostLinkPriorityMedium, PostLinkPriorityLow This was changed to: - CompilePriorityHigh, CompilePriorityMedium, CompilePriorityLow - PreLinkPriorityHigh, PreLinkPriorityMedium, PreLinkPriorityLow - link children - PostLinkPriorityLow, PostLinkPriorityMedium , PostLinkPriorityHigh Using this order the child transclusion directive that gets replaced onto the current element get executed correctly (see issue #3558), and more generally, the order of execution of post linking function makes more sense. The incorrect order was an oversight that has gone unnoticed for many suns and moons. (FYI: postLink functions are the default linking functions) BREAKING CHANGE: the order of postLink fn is now mirror opposite of the order in which corresponding preLinking and compile functions execute. Very few directives in practice rely on order of postLinking function (unlike on the order of compile functions), so in the rare case of this change affecting an existing directive, it might be necessary to convert it to a preLinking function or give it negative priority (look at the diff of this commit to see how an internal attribute interpolation directive was adjusted). Closes #3558
2013-09-19docs(ngModelController): clarify issue with isolated scope directivePete Bacon Darwin
See #4043