Unverified Commit bbdb4eea authored by colemanw's avatar colemanw Committed by GitHub

Merge pull request #13173 from christianwach/issue-557

Prevent viewport jump when toggling help on "Administer CiviCRM" screen
parents 3cfaf3d5 3f8fccc6
......@@ -178,8 +178,8 @@ class CRM_Core_ShowHideBlocks {
* @return array
*/
public static function links(&$form, $prefix, $showLinkText, $hideLinkText, $assign = TRUE) {
$showCode = "cj('#id_{$prefix}').show(); cj('#id_{$prefix}_show').hide();";
$hideCode = "cj('#id_{$prefix}').hide(); cj('#id_{$prefix}_show').show(); return false;";
$showCode = "if(event.preventDefault) event.preventDefault(); else event.returnValue = false; cj('#id_{$prefix}').show(); cj('#id_{$prefix}_show').hide();";
$hideCode = "if(event.preventDefault) event.preventDefault(); else event.returnValue = false; cj('#id_{$prefix}').hide(); cj('#id_{$prefix}_show').show();";
self::setIcons();
$values = array();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment