Преглед изворни кода

HUE-260. Relinquish the keyboard when an error popup is closed.

Aaron Newton пре 15 година
родитељ
комит
d81d10e0da
1 измењених фајлова са 4 додато и 1 уклоњено
  1. 4 1
      desktop/core/static/js/Source/CCS/CCS.Error.js

+ 4 - 1
desktop/core/static/js/Source/CCS/CCS.Error.js

@@ -25,11 +25,14 @@ script: CCS.Error.js
 CCS.error = function(caption, message){
 	message = message || "unknown";
 	if (['element', 'string'].contains($type(message))) {
-		return ART.alert(caption || 'Woops!', message || 'Something has gone horribly, horribly wrong.', $empty, {
+		var alerter =  ART.alert(caption || 'Woops!', message || 'Something has gone horribly, horribly wrong.', function(){
+			alerter.keyboard.relinquish();
+		}, {
 				width: 400,
 				height: 150,
 				mask: true
 		}).inject(document.body);
+		return alerter;
 	} else {
 		dbug.log('not alerting message, as it\'s not a string or element', caption, message);
 	}