From b5dfc2a520b49e31abcf2c289abe2620be3a3b7d Mon Sep 17 00:00:00 2001 From: damencho Date: Wed, 23 Nov 2016 14:48:15 -0600 Subject: [PATCH] Makes close button non-focusable. Prevents the close button to take focus while user clicks tab in the page, which will privent the toast to be closed. --- modules/UI/UI.js | 4 +++- modules/UI/util/MessageHandler.js | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/modules/UI/UI.js b/modules/UI/UI.js index c5bc35eec..42d165859 100644 --- a/modules/UI/UI.js +++ b/modules/UI/UI.js @@ -474,7 +474,9 @@ UI.start = function () { "hideEasing": "linear", "showMethod": "fadeIn", "hideMethod": "fadeOut", - "newestOnTop": false + "newestOnTop": false, + // this is the default toastr close button html, just adds tabIndex + "closeHtml": '' }; } diff --git a/modules/UI/util/MessageHandler.js b/modules/UI/util/MessageHandler.js index 85029bfc3..916e4d93f 100644 --- a/modules/UI/util/MessageHandler.js +++ b/modules/UI/util/MessageHandler.js @@ -439,7 +439,7 @@ var messageHandler = { * @param messageKey the key from the language file for the text of the * message. * @param messageArguments object with the arguments for the message. - * @param options object with language options. + * @param options passed to toastr (e.g. timeOut) */ notify: function(displayName, displayNameKey, cls, messageKey, messageArguments, options) {