aboutsummaryrefslogtreecommitdiffstats
path: root/test/ng/directive/inputSpec.js
AgeCommit message (Collapse)Author
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-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-06chore(inputSpec): fixed typoBen Wiklund
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-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-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-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-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-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-08-15feat(minerr): log minerr doc url in developmentKen Sheedlo
Closes #3566
2013-08-07docs(minerr): fill in error message descriptionsKen Sheedlo
Errors I've documented so far: - `$injector:cdep` - `$injector:itkn` - `$injector:modulerr` - `$injector:nomod` - `$injector:pget` - `$injector:unpr` - `ng:areq` - `ng:cpi` - `ng:cpws` - `ngModel:noass` Closes #3430
2013-08-07fix(input): fix the email regex to accept TLDs up to 6 characters longneilmcgibbon
The input field email regex does't not match long domain extensions. This commit extends the email regexp to take a 6 character TLD. Example 6-character TLDs include .museum and .travel - (e.g. allabout.travel).
2013-07-11fix(ngValue): made ngValue to write value attribute to elementMikk Kirstein
2013-07-11test(ngList): remove disabled testIgor Minar
this test fails and we don't have intentions on making it pass since we never made a commitment to implement this feature.
2013-06-17chore(minErr): replace ngError with minErrKen Sheedlo
2013-05-24feat(ngError): add error message compression and better error messagesIgor Minar
- add toThrowNg matcher
2013-04-17fix(ngModel): use paste/cut events in IE to support context menuMark Dalgleish
In IE the model is not updated when the input value is modified using the context menu, e.g. pasting from the clipboard, or cutting all or part of the current value. To capture these changes, we bind to the proprietary 'paste' and 'cut' events. Closes #1462
2013-04-16fix(ngPattern): allow modifiers on inline ng-patternaustingreco
Add support for regex modifiers on inline `ng-pattern`. `ng-pattern="/regex/i"` now validates correctly. Closes #1437
2012-11-26feat(form): add ability to reset a form to pristine statePawel Kozlowski
Retting a form to pristine state will cause all of the nested form and form controls to be recursively reset as well. Closes #856
2012-09-06feat(ngModel): support ngTrim attribute on inputGregory Pike
2012-06-08feat($compile): simplify isolate scope bindingsMisko Hevery
Changed the isolate scope binding options to: - @attr - attribute binding (including interpolation) - =model - by-directional model binding - &expr - expression execution binding This change simplifies the terminology as well as number of choices available to the developer. It also supports local name aliasing from the parent. BREAKING CHANGE: isolate scope bindings definition has changed and the inject option for the directive controller injection was removed. To migrate the code follow the example below: Before: scope: { myAttr: 'attribute', myBind: 'bind', myExpression: 'expression', myEval: 'evaluate', myAccessor: 'accessor' } After: scope: { myAttr: '@', myBind: '@', myExpression: '&', // myEval - usually not useful, but in cases where the expression is assignable, you can use '=' myAccessor: '=' // in directive's template change myAccessor() to myAccessor } The removed `inject` wasn't generaly useful for directives so there should be no code using it.
2012-06-02doc(NgModelController) add example and $render documentationMisko Hevery
Closes#930
2012-05-06fix(ngModel): use keydown/change events on IE9 instead of inputIgor Minar
On IE9 the input event is not fired when backspace or delete key are pressed or when cut is performed. This makes listening on the input event unreliable and therefore it's better for us to just use keydown/change events instead. Closes #879
2012-04-11fix(input.radio): support 2-way binding in a repeaterVojta Jina
Closes #869
2012-04-09chore(tests): rename all directive names to the normalized formIgor Minar
2012-04-03feat(ngModel): update model on each key stroke (revert ngModelInstant)Vojta Jina
It turns out that listening only on "blur" event is not sufficient in many scenarios, especially when you use form validation you always had to use ngModelnstant e.g. if you want to disable a button based on valid/invalid form. The feedback we got from our apps as well as external apps is that the ngModelInstant should be the default. In the future we might provide alternative ways of suppressing updates on each key stroke, but it's not going to be the default behavior. Apps already using the ngModelInstant can safely remove it from their templates. Input fields without ngModelInstant directive will start propagating the input changes into the model on each key stroke.
2012-03-29fix(ngValue): bind properly inside ng-repeatVojta Jina
2012-03-28chore(module): move files around in preparation for more modulesMisko Hevery