forked from ariatemplates/hashspace
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
prevent field refresh on keydown event - fixes ariatemplates#110
- Loading branch information
Bertrand Laporte
committed
Mar 30, 2014
1 parent
3ac3f30
commit 9826b08
Showing
5 changed files
with
46 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
|
||
Hashspace automatically listens to the main change events of its input elements (*click*, *keypress* and *keyup*) in order to transparently synchronize the input values with the data referenced through the value expression. | ||
Hashspace automatically listens to the main change events of its input elements (*click*, *focus* and *keyup*) in order to transparently synchronize the input values with the data referenced through the value expression. | ||
|
||
The following example shows the same value referenced by two several text fields and a read-only span: | ||
|
||
[#output] | ||
|
||
For the time being, only simple path expressions are supported to reference input values in a bi-directional way. | ||
|
||
You can note that *radio* inputs have to use a **model** attribute in order to be bind their selection to the data-model. All radio buttons referencing the same model property will automatically belong the same group - and they don't need to have the same *name* attribute as in classical HTML forms. | ||
|
||
For the sake of consistency the **model** attribute can also be used on all input types, even if the *value* attribute can be used as well, as shown in the previous example. | ||
|
||
**Note:** When users type in an input field, **hashspace synchronizes the data model on the keyup event**. As a consequence, applications that need to validate (and potentially change) user inputs should listen to this **keyup** event, and not to the *keydown* event as text fields are not updated yet at this stage. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters