summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorstefan.r2016-10-03 08:31:57 (GMT)
committerstefan.r2016-10-03 08:33:31 (GMT)
commit1f6920c9c3aa489c12bfcb53ef42dd6c689e8120 (patch)
treeed1a7619b08cd46e2bcd79c22d616c44643c2387
parenta3532b67450905c5cc7b2e42b0a4881a164f71c8 (diff)
Revert "Issue #1232416 by hanoii, nod_, heddn, geerlingguy, lokapujya, David_Rothstein, mangy.fox, xurizaemon, timfernihough, jibran, effulgentsia, j0rd, joelpittet, temkin, slashrsm, maxi Todorov, leewillis77, droplet, showrx, orbiteleven, opdavies, rooby, yechuah, shabana.navas, nikunjkotecha, ehj-52n, jhedstrom, sah62, edutrul, rfay, seutje, drupalshrek: Drupal alerts "An AJAX HTTP request terminated abnormally" during normal site operation, confusing site visitors/editors"
This reverts commit a3532b67450905c5cc7b2e42b0a4881a164f71c8
-rw-r--r--CHANGELOG.txt3
-rw-r--r--misc/ajax.js2
-rw-r--r--misc/autocomplete.js2
-rw-r--r--misc/drupal.js23
4 files changed, 2 insertions, 28 deletions
diff --git a/CHANGELOG.txt b/CHANGELOG.txt
index d311993..fa3dd35 100644
--- a/CHANGELOG.txt
+++ b/CHANGELOG.txt
@@ -8,9 +8,6 @@ Drupal 7.51, xxxx-xx-xx (development version)
- Log messages are now XSS filtered on display.
- Draggable tables do now work on touch screen devices.
- Added setting for allowing double underscores in CSS identifiers.
-- If a user navigates away from a page while an AJAX request is running they
- will no longer get an error message saying "An AJAX HTTP request terminated
- abnormally"
- Numerous performance improvements.
- Numerous small bugfixes.
- Numerous API documentation improvements.
diff --git a/misc/ajax.js b/misc/ajax.js
index c944ebb..bb4a6e1 100644
--- a/misc/ajax.js
+++ b/misc/ajax.js
@@ -476,7 +476,7 @@ Drupal.ajax.prototype.getEffect = function (response) {
* Handler for the form redirection error.
*/
Drupal.ajax.prototype.error = function (xmlhttprequest, uri, customMessage) {
- Drupal.displayAjaxError(Drupal.ajaxError(xmlhttprequest, uri, customMessage));
+ alert(Drupal.ajaxError(xmlhttprequest, uri, customMessage));
// Remove the progress element.
if (this.progress.element) {
$(this.progress.element).remove();
diff --git a/misc/autocomplete.js b/misc/autocomplete.js
index af09071..d71441b 100644
--- a/misc/autocomplete.js
+++ b/misc/autocomplete.js
@@ -310,7 +310,7 @@ Drupal.ACDB.prototype.search = function (searchString) {
}
},
error: function (xmlhttp) {
- Drupal.displayAjaxError(Drupal.ajaxError(xmlhttp, db.uri));
+ alert(Drupal.ajaxError(xmlhttp, db.uri));
}
});
}, this.delay);
diff --git a/misc/drupal.js b/misc/drupal.js
index 03eef50..427c4a1 100644
--- a/misc/drupal.js
+++ b/misc/drupal.js
@@ -414,29 +414,6 @@ Drupal.getSelection = function (element) {
};
/**
- * Add a global variable which determines if the window is being unloaded.
- *
- * This is primarily used by Drupal.displayAjaxError().
- */
-Drupal.beforeUnloadCalled = false;
-$(window).bind('beforeunload pagehide', function () {
- Drupal.beforeUnloadCalled = true;
-});
-
-/**
- * Displays a JavaScript error from an Ajax response when appropriate to do so.
- */
-Drupal.displayAjaxError = function (message) {
- // Skip displaying the message if the user deliberately aborted (for example,
- // by reloading the page or navigating to a different page) while the Ajax
- // request was still ongoing. See, for example, the discussion at
- // http://stackoverflow.com/questions/699941/handle-ajax-error-when-a-user-clicks-refresh.
- if (!Drupal.beforeUnloadCalled) {
- alert(message);
- }
-};
-
-/**
* Build an error message from an Ajax response.
*/
Drupal.ajaxError = function (xmlhttp, uri, customMessage) {