Merge pull request #8761 from opf/fix/34436-edit-backlog-date-focus-backlog-details

Datepicker shown on first click with no side effects
pull/8771/head
ulferts 4 years ago committed by GitHub
commit 88c80c7498
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  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