Datepicker shown on first click with no side effects

pull/8761/head^2
Aleix Suau 4 years ago
parent 0e6072aefa
commit 05b30a64e7
  1. 5
      frontend/src/app/modules/augmenting/dynamic-scripts/backlogs/model.js
  2. 2
      frontend/src/app/modules/augmenting/dynamic-scripts/backlogs/story.js
  3. 2
      modules/backlogs/app/views/rb_sprints/_sprint.html.erb

@ -312,7 +312,10 @@ RB.Model = (function ($) {
if (!j.hasClass('editing') && !j.hasClass('dragging') && !j.hasClass('prevent_edit') && !$(e.target).hasClass('prevent_edit')) {
editor = model.edit();
editor.find('.' + $(e.currentTarget).attr('fieldname') + '.editor').focus();
var input = editor.find('.' + $(e.currentTarget).attr('fieldname') + '.editor');
input.focus();
input.click();
}
},

@ -37,7 +37,7 @@ RB.Story = (function ($) {
// Associate this object with the element for later retrieval
this.$.data('this', this);
this.$.on('mouseup', '.editable', this.handleClick);
this.$.on('click', '.editable', this.handleClick);
},
/**

@ -54,7 +54,7 @@ See docs/COPYRIGHT.rdoc for more details.
<%= text_field_tag :start_date,
sprint.start_date,
id: "start_date_#{sprint.id}",
class: '-augmented-datepicker effective_date editor' %>
class: '-augmented-datepicker start_date editor' %>
<%= text_field_tag :name,
sprint.name,
class: 'name editor' %>

Loading…
Cancel
Save