Skip to content

Commit

Permalink
Merge pull request #13173 from christianwach/issue-557
Browse files Browse the repository at this point in the history
Prevent viewport jump when toggling help on "Administer CiviCRM" screen
  • Loading branch information
colemanw authored Dec 2, 2018
2 parents 3cfaf3d + 3f8fccc commit bbdb4ee
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions CRM/Core/ShowHideBlocks.php
Original file line number Diff line number Diff line change
Expand Up @@ -178,8 +178,8 @@ public static function linkHtml($name, $href, $text, $js) {
* @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();
Expand Down

0 comments on commit bbdb4ee

Please sign in to comment.