Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
T
todomvc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Eugene Shen
todomvc
Commits
5ff915aa
Commit
5ff915aa
authored
Feb 17, 2015
by
Sindre Sorhus
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1168 from samccone/sjs/fix-escape-behavior
Fix spec compliance for Marionette.
parents
f7ece0f5
ca2b6620
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
1 deletion
+12
-1
examples/backbone_marionette/js/TodoMVC.Layout.js
examples/backbone_marionette/js/TodoMVC.Layout.js
+12
-1
No files found.
examples/backbone_marionette/js/TodoMVC.Layout.js
View file @
5ff915aa
...
...
@@ -14,7 +14,18 @@ TodoMVC.module('Layout', function (Layout, App, Backbone) {
},
events
:
{
'
keypress @ui.input
'
:
'
onInputKeypress
'
'
keypress @ui.input
'
:
'
onInputKeypress
'
,
'
keyup @ui.input
'
:
'
onInputKeyup
'
},
// According to the spec
// If escape is pressed during the edit, the edit state should be left and any changes be discarded.
onInputKeyup
:
function
(
e
)
{
var
ESC_KEY
=
27
;
if
(
e
.
which
===
ESC_KEY
)
{
this
.
render
();
}
},
onInputKeypress
:
function
(
e
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment