angular-cn/packages
Kara Erickson 5efc86069f fix(forms): make composition event buffering configurable (#15256)
This commit fixes a regression where `ngModel` no longer syncs
letter by letter on Android devices, and instead syncs at the
end of every word. This broke when we introduced buffering of
IME events so IMEs like Pinyin keyboards or Katakana keyboards
wouldn't display composition strings. Unfortunately, iOS devices
and Android devices have opposite event behavior. Whereas iOS
devices fire composition events for IME keyboards only, Android
fires composition events for Latin-language keyboards. For
this reason, languages like English don't work as expected on
Android if we always buffer. So to support both platforms,
composition string buffering will only be turned on by default
for non-Android devices.

However, we have also added a `COMPOSITION_BUFFER_MODE` token
to make this configurable by the application. In some cases, apps
might might still want to receive intermediate values. For example,
some inputs begin searching based on Latin letters before a
character selection is made.

As a provider, this is fairly flexible. If you want to turn
composition buffering off, simply provide the token at the top
level:

```ts
providers: [
   {provide: COMPOSITION_BUFFER_MODE, useValue: false}
]
```

Or, if you want to change the mode  based on locale or platform,
you can use a factory:

```ts
import {shouldUseBuffering} from 'my/lib';

....
providers: [
   {provide: COMPOSITION_BUFFER_MODE, useFactory: shouldUseBuffering}
]
```

Closes #15079.

PR Close #15256
2017-03-21 16:47:18 -05:00
..
animations fix(animations): ensure empty animate() steps work at the end of a sequence (#15328) 2017-03-21 14:26:43 -05:00
benchpress refactor: update paths from modules/@angular to packages 2017-03-08 16:29:28 -08:00
common test: add systemjs+umd integration test (#14196) 2017-03-19 12:23:07 -05:00
compiler refactor(core): misc cleanup (#15366) 2017-03-21 16:46:51 -05:00
compiler-cli docs(compiler-cli): mention that `.ngsummary.json` files should be gitignore'd (#15047) 2017-03-21 12:20:38 -05:00
core refactor(core): misc cleanup (#15366) 2017-03-21 16:46:51 -05:00
docs refactor: move angular source to /packages rather than modules/@angular 2017-03-08 16:29:27 -08:00
examples feat(upgrade): use `ComponentFactory.inputs/outputs/ngContentSelectors` (#15214) 2017-03-17 13:52:50 -05:00
forms fix(forms): make composition event buffering configurable (#15256) 2017-03-21 16:47:18 -05:00
http test: add systemjs+umd integration test (#14196) 2017-03-19 12:23:07 -05:00
language-service build: fix paths to typings files so tsickle resolves imports correctly 2017-03-16 17:34:29 -07:00
platform-browser test: add systemjs+umd integration test (#14196) 2017-03-19 12:23:07 -05:00
platform-browser-dynamic test: add systemjs+umd integration test (#14196) 2017-03-19 12:23:07 -05:00
platform-server fix(platform-server): throw a better error message for relative URLs (#15357) 2017-03-21 14:26:51 -05:00
platform-webworker fix(forms): make composition event buffering configurable (#15256) 2017-03-21 16:47:18 -05:00
platform-webworker-dynamic test: add systemjs+umd integration test (#14196) 2017-03-19 12:23:07 -05:00
router feat(router): add `ParamMap.keys` to get a list of parameters 2017-03-20 09:19:32 -07:00
upgrade test: add systemjs+umd integration test (#14196) 2017-03-19 12:23:07 -05:00
README.md refactor: move angular source to /packages rather than modules/@angular 2017-03-08 16:29:27 -08:00
empty.ts refactor: move angular source to /packages rather than modules/@angular 2017-03-08 16:29:27 -08:00
es6-subset.d.ts refactor: update paths from modules/@angular to packages 2017-03-08 16:29:28 -08:00
license-banner.txt refactor: move angular source to /packages rather than modules/@angular 2017-03-08 16:29:27 -08:00
router-license-banner.txt refactor: move angular source to /packages rather than modules/@angular 2017-03-08 16:29:27 -08:00
system.d.ts refactor: move angular source to /packages rather than modules/@angular 2017-03-08 16:29:27 -08:00
tsconfig.json test(platform-server): add initial e2e tests for platform-server (#15061) 2017-03-14 17:11:39 -07:00
types.d.ts refactor: move angular source to /packages rather than modules/@angular 2017-03-08 16:29:27 -08:00

README.md

Angular

The sources for this package are in the main Angular repo. Please file issues and pull requests against that repo.

License: MIT