Revision 5939efeb ui/static/snf/js/ui/web/ui_networks_view.js
b/ui/static/snf/js/ui/web/ui_networks_view.js | ||
---|---|---|
362 | 362 |
this.input.val(this.network.get("name")); |
363 | 363 |
this.el.append(this.input); |
364 | 364 |
this.input.focus(); |
365 |
this.input.bind("keypress", _.bind(function(ev){ |
|
366 |
if (ev.which == 13) { |
|
367 |
this.submit(); |
|
368 |
} |
|
369 |
if (ev.keyCode == 17) {this.editing = false; this.update_layout()}; |
|
365 |
this.input.bind("keydown", _.bind(function(ev){ |
|
366 |
ev.keyCode = ev.keyCode || ev.which; |
|
367 |
if (ev.keyCode == 13) { this.submit(); }; |
|
368 |
if (ev.keyCode == 27) {this.editing = false; this.update_layout()}; |
|
370 | 369 |
}, this)); |
371 | 370 |
}, |
372 | 371 |
|
Also available in: Unified diff