From 82161ae7120d0c74117c9a4ad8d21fd2bfc541da Mon Sep 17 00:00:00 2001 From: Michael Jumper Date: Wed, 2 Jun 2021 15:45:47 -0700 Subject: [PATCH] GUACAMOLE-773: Consider Pickr available only if initialization has completed. In previous versions of Pickr, catching exceptions during Pickr creation was sufficient to detect whether Pickr can be used with the current browser. This is no longer the case, and we must instead rely on the lack of an "init" event. --- .../main/frontend/src/app/form/services/colorPickerService.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/guacamole/src/main/frontend/src/app/form/services/colorPickerService.js b/guacamole/src/main/frontend/src/app/form/services/colorPickerService.js index c448866c8..d8494a6a6 100644 --- a/guacamole/src/main/frontend/src/app/form/services/colorPickerService.js +++ b/guacamole/src/main/frontend/src/app/form/services/colorPickerService.js @@ -202,7 +202,7 @@ angular.module('form').provider('colorPickerService', function colorPickerServic * selectColor(), false otherwise. */ service.isAvailable = function isAvailable() { - return !!pickr; + return pickrInitComplete; }; /**