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.
This commit is contained in:
damencho 2016-11-23 14:48:15 -06:00
parent 71c27f308c
commit b5dfc2a520
2 changed files with 4 additions and 2 deletions

View File

@ -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": '<button type="button" tabIndex="-1">&times;</button>'
};
}

View File

@ -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) {