diff options
author | Miodrag Tokić <miki@denimo.io> | 2018-12-19 21:15:55 +0100 |
---|---|---|
committer | Miodrag Tokić <miki@denimo.io> | 2018-12-20 13:57:43 +0100 |
commit | eccfff451af529253e70d50abda7e72881cbc75d (patch) | |
tree | 73b0251fcaa309f528f393648e8f0836ba27405b /assets/js/src | |
parent | f470873d5d95571a30a99c2482ece7873e8f88d5 (diff) |
Limit assignee drop-down selector scope
On the task details page "Add a sub-task" pop-up modal contains
drop-down (the SELECT HTML element) with "form-user_id" as the `name`
and the `id` attribute value. This element is in conflict with another,
hidden INPUT element with the same `name` and the `id` value. This
causes an issue where clicking the "Me" (Assignee) link / shortcut (A)
element doesn't select your name in the Assignee SELECT element.
Avoiding conflict by changing the SELECT element `id` value is not
possible as the SELECT element is generated using `FormHelper::select()`
function which uses the same value for attribute `name` and `id`.
Given the assignee shortcut feature is used only in two places: edit
task and edit sub-task dialog, the simplest solution is to select the
closest SELECT element to the link / shortcut (A) element or limit the
scope to the currently opened dialog.
This fix uses the latter approach by limiting the scope of targeted
selector.
Diffstat (limited to 'assets/js/src')
-rw-r--r-- | assets/js/src/Task.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/assets/js/src/Task.js b/assets/js/src/Task.js index 19cf39e8..fc9839ac 100644 --- a/assets/js/src/Task.js +++ b/assets/js/src/Task.js @@ -11,7 +11,7 @@ Kanboard.Task.prototype.onPopoverOpened = function() { // Assign to me $(document).on("click", ".assign-me", function(e) { var currentId = $(this).data("current-id"); - var dropdownId = "#" + $(this).data("target-id"); + var dropdownId = "#modal-box #" + $(this).data("target-id"); e.preventDefault(); |