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

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.
j8
damencho 8 лет назад
Родитель
Сommit
b5dfc2a520
2 измененных файлов: 4 добавлений и 2 удалений
  1. 3
    1
      modules/UI/UI.js
  2. 1
    1
      modules/UI/util/MessageHandler.js

+ 3
- 1
modules/UI/UI.js Просмотреть файл

474
             "hideEasing": "linear",
474
             "hideEasing": "linear",
475
             "showMethod": "fadeIn",
475
             "showMethod": "fadeIn",
476
             "hideMethod": "fadeOut",
476
             "hideMethod": "fadeOut",
477
-            "newestOnTop": false
477
+            "newestOnTop": false,
478
+            // this is the default toastr close button html, just adds tabIndex
479
+            "closeHtml": '<button type="button" tabIndex="-1">&times;</button>'
478
         };
480
         };
479
 
481
 
480
     }
482
     }

+ 1
- 1
modules/UI/util/MessageHandler.js Просмотреть файл

439
      * @param messageKey the key from the language file for the text of the
439
      * @param messageKey the key from the language file for the text of the
440
      * message.
440
      * message.
441
      * @param messageArguments object with the arguments for the message.
441
      * @param messageArguments object with the arguments for the message.
442
-     * @param options object with language options.
442
+     * @param options passed to toastr (e.g. timeOut)
443
      */
443
      */
444
     notify: function(displayName, displayNameKey, cls, messageKey,
444
     notify: function(displayName, displayNameKey, cls, messageKey,
445
                      messageArguments, options) {
445
                      messageArguments, options) {

Загрузка…
Отмена
Сохранить