Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes various issues with javascript services #10800

Merged
merged 7 commits into from
Aug 6, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ function umbTreeDirective($q, treeService, navigationService, notificationsServi
*/
$scope.select = function (n, ev) {

navigationService.closeBackdrop();
navigationService.hideMenu();

if (n.metaData && n.metaData.noAccess === true) {
ev.preventDefault();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,20 +32,20 @@ angular.module('umbraco.directives')

return {
restrict: 'A',
link: function (scope, element, attr) {
link: function (scope, element) {

var listItems = [];
var currentIndex = 0;
var focusSet = false;

$timeout(function(){
$timeout(function() {
// get list of all links in the list
listItems = element.find("li :tabbable");
});

// Handle keydown events
function keydown(event) {
$timeout(function(){
$timeout(function() {
checkFocus();
// arrow down
if (event.keyCode === 40) {
Expand Down Expand Up @@ -109,7 +109,6 @@ angular.module('umbraco.directives')

// Stop listening when scope is destroyed.
scope.$on('$destroy', stopListening);

}
};
}]);
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ function navigationService($routeParams, $location, $q, $injector, eventsService
var aboveClass = "above-backdrop";
var leftColumn = document.getElementById("leftcolumn");

if(leftColumn !== null) {
if(leftColumn) {
var isLeftColumnOnTop = leftColumn.classList.contains(aboveClass);

if (isLeftColumnOnTop) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
box-shadow: 0 10px 20px rgba(0,0,0,.12),0 6px 6px rgba(0,0,0,.14);
}

.umb-search__label{
.umb-search__label {
margin: 0;
}

Expand All @@ -33,7 +33,7 @@
height: 70px;
}

.umb-search-input {
input.umb-search-input {
width: 100%;
height: 70px;
border: none;
Expand Down
2 changes: 1 addition & 1 deletion src/Umbraco.Web.UI.Client/src/utilities.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@
* Not equivalent to angular.forEach. But like the angularJS method this does not fail on null or undefined.
*/
const forEach = (obj, iterator) => {
if (obj) {
if (obj && isArray(obj)) {
return obj.forEach(iterator);
}
return obj;
Expand Down