Revision 5939efeb ui/static/snf/js/ui/web/ui_icon_view.js

b/ui/static/snf/js/ui/web/ui_icon_view.js
193 193
            // give edit focus
194 194
            this.$('input').focus();
195 195
            // handle enter press
196
            this.$('input').keypress(function(ev){
197
                if (ev.charCode == 13) {
198
                    self.submit();
199
                }
196
            this.$('input').keydown(function(ev){
197
                ev.keyCode = ev.keyCode || ev.which;
198
                if (ev.keyCode == 13) { self.submit(); }
199
                if (ev.keyCode == 27) { self.renaming = false; self.update_layout(); }
200 200
            })
201 201
        },
202 202
        

Also available in: Unified diff