https://www.redmine.org/https://www.redmine.org/favicon.ico?16793021292020-01-15T04:16:50ZRedmineRedmine - Defect #32812: Clicking on a parent object in gantt wrongly collapses objects at the same levelhttps://www.redmine.org/issues/32812?journal_id=957312020-01-15T04:16:50ZYuichi HARADA
<ul></ul><p>The cause is that the start position (<code>subject_left</code>) did not include the width of the folding icon.<br />Solved by the following patch (Firefox, Chrome, Safari, IE11, Edge confirmed).</p>
<pre><code class="diff syntaxhl"><span class="gh">diff --git a/public/javascripts/gantt.js b/public/javascripts/gantt.js
index ebaaa2b46..efda080ee 100644
</span><span class="gd">--- a/public/javascripts/gantt.js
</span><span class="gi">+++ b/public/javascripts/gantt.js
</span><span class="p">@@ -231,8 +231,9 @@</span> function resizableSubjectColumn(){
}
ganttEntryClick = function(e){
<span class="gd">- var subject = $(e.target.parentElement);
- var subject_left = parseInt(subject.css('left'));
</span><span class="gi">+ var icon_expander = e.target;
+ var subject = $(icon_expander.parentElement);
+ var subject_left = parseInt(subject.css('left')) + parseInt(icon_expander.offsetWidth);
</span> var target_shown = null;
var target_top = 0;
var total_height = 0;
</code></pre> Redmine - Defect #32812: Clicking on a parent object in gantt wrongly collapses objects at the same levelhttps://www.redmine.org/issues/32812?journal_id=957472020-01-16T01:28:56ZGo MAEDA
<ul><li><strong>Status</strong> changed from <i>New</i> to <i>Confirmed</i></li><li><strong>Target version</strong> set to <i>4.1.1</i></li></ul><p>Setting the target version to 4.1.1.</p> Redmine - Defect #32812: Clicking on a parent object in gantt wrongly collapses objects at the same levelhttps://www.redmine.org/issues/32812?journal_id=957482020-01-16T03:39:41ZGo MAEDA
<ul><li><strong>Related to</strong> <i><a class="issue tracker-2 status-5 priority-4 priority-default closed" href="/issues/6417">Feature #6417</a>: Allow collapse/expand in gantt chart</i> added</li></ul> Redmine - Defect #32812: Clicking on a parent object in gantt wrongly collapses objects at the same levelhttps://www.redmine.org/issues/32812?journal_id=957722020-01-18T00:23:26ZGo MAEDA
<ul><li><strong>Subject</strong> changed from <i>Gantt: Folding parent ticket collapses all subsequent tickets</i> to <i>Clicking on a parent object in gantt wrongly collapses objects at the same level</i></li><li><strong>Status</strong> changed from <i>Confirmed</i> to <i>Closed</i></li><li><strong>Assignee</strong> set to <i>Go MAEDA</i></li><li><strong>Resolution</strong> set to <i>Fixed</i></li></ul><p>Committed the fix. Thank you.</p>