Skip to content

Commit

Permalink
Only preventing default action for keypress in templating form when i…
Browse files Browse the repository at this point in the history
…t is one of the defined shortcuts
  • Loading branch information
bbpennel committed Jul 28, 2015
1 parent 4bf6519 commit 6ddaf0c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion jquery.xmleditor.js
Original file line number Diff line number Diff line change
Expand Up @@ -5020,11 +5020,11 @@ XMLTemplates.prototype.focusTemplate = function() {
// Focus selected template
this.form.on('keydown click', '.templating', function(e) {

e.preventDefault();
var key = e.which;
var number_of_forms, base_element, current, form_id, next_element;

if (key === 1 || key === 9) {
e.preventDefault();
number_of_forms = $('.templating').length;

// Left click, select the clicked target
Expand Down
2 changes: 1 addition & 1 deletion src/xml_templates.js
Original file line number Diff line number Diff line change
Expand Up @@ -127,11 +127,11 @@ XMLTemplates.prototype.focusTemplate = function() {
// Focus selected template
this.form.on('keydown click', '.templating', function(e) {

e.preventDefault();
var key = e.which;
var number_of_forms, base_element, current, form_id, next_element;

if (key === 1 || key === 9) {
e.preventDefault();
number_of_forms = $('.templating').length;

// Left click, select the clicked target
Expand Down

0 comments on commit 6ddaf0c

Please sign in to comment.