Просмотр исходного кода

HUE-103. Dock bar application switching alternates into windows that aren't on top

Aaron Newton 15 лет назад
Родитель
Сommit
f930180a84

+ 5 - 5
desktop/core/static/js/Source/CCS/CCS.Desktop.js

@@ -192,15 +192,15 @@ CCS.Desktop = {
 		if (instances.length == 1) {
 			instances[0].focus();
 		} else {
-			instances.sort(function(left, right){
+			var sorted = instances.sort(function(left, right){
 				var zl = $(left).getStyle('z-index').toInt();
 				var zr = $(right).getStyle('z-index').toInt();
 				return (zl == zr) ? 0 : (zl < zr) ? -1 : 1;
-			}).each(function(instance){
-				instance.bringToFront();
 			});
-			var last = instances.getLast();
-			if (last.focus) last.focus();
+			sorted.each(function(win, i){
+				if (i == sorted.length - 1) win.focus(true);
+				else win.bringToFront(true);
+			});
 		}
 		return instances;
 	},

+ 1 - 1
ext/thirdparty/js/art-widgets.hash

@@ -1 +1 @@
-ae61e01568479e76bae31e0d0874ffe4fe792f48
+76cc346e2f59c252f79d23b915f95e8ccf4ad7ba