From 3a7c270f5773227564e072fd9d3b38b83e47c1d6 Mon Sep 17 00:00:00 2001 From: nogalpaulina Date: Mon, 4 Oct 2021 11:58:02 -0500 Subject: [PATCH] Remove KeepFocus directive (#933) --- CHANGELOG.md | 1 + .../main/webapp/my-app/layout/directives.js | 19 ------------------- .../layout/list/partials/home-list-view.html | 1 - .../widget/partials/home-widget-view.html | 1 - 4 files changed, 1 insertion(+), 21 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b9727f285..0ae9dba47 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,7 @@ Versions in this document should match those + Automate migrating layout from old layout backend to new layout backend. + Ensure there are no duplicate fnames in layout ++ Remove ineffectual KeepFocus directive ## 13.0.0 - 2021-04-23 diff --git a/web/src/main/webapp/my-app/layout/directives.js b/web/src/main/webapp/my-app/layout/directives.js index 9e043febc..b64686356 100644 --- a/web/src/main/webapp/my-app/layout/directives.js +++ b/web/src/main/webapp/my-app/layout/directives.js @@ -55,24 +55,5 @@ define(['angular', 'require'], function(angular, require) { restrict: 'E', templateUrl: require.toUrl('./partials/remove-button.html'), }; - }) - .directive('keepFocus', function($timeout) { - return { - restrict: 'A', - scope: { - nodeId: '@', - index: '@', - selectedNodeId: '@', - }, - link: function($scope, $element, attrs) { - $scope.$watch('index', function(currentValue, previousValue) { - if ($scope.nodeId === $scope.selectedNodeId) { - $timeout(function() { - $element[0].focus(); - }); - } - }); - }, - }; }); }); diff --git a/web/src/main/webapp/my-app/layout/list/partials/home-list-view.html b/web/src/main/webapp/my-app/layout/list/partials/home-list-view.html index ff863bc7d..1b6013815 100644 --- a/web/src/main/webapp/my-app/layout/list/partials/home-list-view.html +++ b/web/src/main/webapp/my-app/layout/list/partials/home-list-view.html @@ -36,7 +36,6 @@