Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save markconroy/231720b4e57cc8e02083e94846a611b7 to your computer and use it in GitHub Desktop.
Save markconroy/231720b4e57cc8e02083e94846a611b7 to your computer and use it in GitHub Desktop.
diff --git a/core/misc/ajax.js b/core/misc/ajax.js
index fefe9f3..c1c81f9 100644
--- a/core/misc/ajax.js
+++ b/core/misc/ajax.js
@@ -1061,13 +1061,19 @@
// Immediately hide the new content if we're using any effects.
if (effect.showEffect !== 'show') {
- $new_content.hide();
+ // I am commenting out the following line, as it makes any paragraph
+ // bundle that needs to load some ajax (text, entity reference, etc)
+ // not load on first load in Safari if it's clicked after a cache clear
+ // - an edge case, I know! - Mark Conroy.
+ // $new_content.hide();
}
// Determine which effect to use and what content will receive the
// effect, then show the new content.
if ($new_content.find('.ajax-new-content').length > 0) {
- $new_content.find('.ajax-new-content').hide();
+ // I am setting below to be .show() instead of .hide() because of the
+ // above issue on Safari.
+ $new_content.find('.ajax-new-content').show();
$new_content.show();
$new_content.find('.ajax-new-content')[effect.showEffect](effect.showSpeed);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment