From af47cbb5033cc3c83d2a89c6e0666c23139f877d Mon Sep 17 00:00:00 2001 From: Mihail Maxacov <0xf013@gmail.com> Date: Fri, 10 Apr 2015 12:46:05 +0300 Subject: [PATCH 1/2] fix focus traversal through all editables --- .../inplace-editor-display-pane-directive.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/frontend/app/work_packages/directives/inplace_editor/inplace-editor-display-pane-directive.js b/frontend/app/work_packages/directives/inplace_editor/inplace-editor-display-pane-directive.js index 4a5e9c0d8f..1896d44150 100644 --- a/frontend/app/work_packages/directives/inplace_editor/inplace-editor-display-pane-directive.js +++ b/frontend/app/work_packages/directives/inplace_editor/inplace-editor-display-pane-directive.js @@ -92,10 +92,13 @@ module.exports = function( scope.displayPaneController.placeholder = I18n.t('js.label_click_to_enter_description'); } - scope.$watch('fieldController.isEditing', function(isEditing) { + scope.$watch('fieldController.isEditing', function(isEditing, oldIsEditing) { if (!isEditing) { $timeout(function() { - element.find('.inplace-editing--trigger-link').focus(); + if (oldIsEditing) { + // check old value to not trigger focus on the first time + element.find('.inplace-editing--trigger-link').focus(); + } element.find('.inplace-edit--read-value a').off('click').on('click', function(e) { e.stopPropagation(); }); From 7a09b8ecec6155af1c73c37f9597970bee3a5519 Mon Sep 17 00:00:00 2001 From: Florian Kraft Date: Mon, 13 Apr 2015 14:26:29 +0200 Subject: [PATCH 2/2] use lodash cloneDeep instead of using angular.copy this should resolve a performance issue in the WP details view in the latest Firefox --- frontend/app/work_packages/filters/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/app/work_packages/filters/index.js b/frontend/app/work_packages/filters/index.js index e058395439..b937fb41a5 100644 --- a/frontend/app/work_packages/filters/index.js +++ b/frontend/app/work_packages/filters/index.js @@ -52,7 +52,7 @@ angular.module('openproject.workPackages.filters') .filter('remainingFilterNames', ['orderByFilter', 'FiltersHelper', function(orderByFilter, FiltersHelper) { function subtractActiveFilters(filters, filtersToSubtract) { - var filterDiff = angular.copy(filters); + var filterDiff = _.cloneDeep(filters); angular.forEach(filtersToSubtract, function(filter) { if(!filter.deactivated) delete filterDiff[filter.name];