From 19526fc033f67c4b80c919991ac5710428738515 Mon Sep 17 00:00:00 2001 From: Daniel Metanet Date: Fri, 6 Apr 2018 16:48:08 -0300 Subject: [PATCH] Fix the problem where ajax-progress icon is not showing when submit button is not visible by the view. --- js/misc/ajax.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/misc/ajax.js b/js/misc/ajax.js index c76532c..1d88f80 100644 --- a/js/misc/ajax.js +++ b/js/misc/ajax.js @@ -65,8 +65,8 @@ Drupal.ajax.prototype.beforeSend = function (xmlhttprequest, options) { $('.throbber', this.progress.element).after('
' + this.progress.message + '
'); } - // If element is an input type, append after. - if ($element.is('input')) { + // If element is an input type, empty, or not visible, append after. + if ($element.is('input, :empty, :not(:visible)')) { $element.after(this.progress.element); } else if ($element.is('select')) {