diff --git a/typo3/sysext/backend/Resources/Public/JavaScript/ContextHelp.js b/typo3/sysext/backend/Resources/Public/JavaScript/ContextHelp.js index 741f8cbe40fecc98ac045d67d6acd8ca6e91f24c..105dd436c577d5da0e9bb8bcecca637d8ef14e7f 100644 --- a/typo3/sysext/backend/Resources/Public/JavaScript/ContextHelp.js +++ b/typo3/sysext/backend/Resources/Public/JavaScript/ContextHelp.js @@ -68,6 +68,11 @@ define(['jquery', 'TYPO3/CMS/Backend/Popover', 'bootstrap'], function($) { } else if ($me.attr('data-loaded') === 'false' && $me.data('table')) { ContextHelp.loadHelp($me); } + + // if help icon is in DocHeader, force open to bottom + if ($me.closest('.t3js-module-docheader').length) { + TYPO3.Popover.setOption($me, 'placement', 'bottom'); + } }); $(document).on('shown.bs.popover', ContextHelp.selector, function(evt) { var $popover = $(evt.target).data('bs.popover').$tip; diff --git a/typo3/sysext/backend/Resources/Public/JavaScript/Popover.js b/typo3/sysext/backend/Resources/Public/JavaScript/Popover.js index e06c2e44144d2d25969cc9cce3b1393862cf4772..ad3689de5ce33e9d83396c968999968fd5305482 100644 --- a/typo3/sysext/backend/Resources/Public/JavaScript/Popover.js +++ b/typo3/sysext/backend/Resources/Public/JavaScript/Popover.js @@ -60,6 +60,17 @@ define(['jquery', 'bootstrap'], function($) { .popover(options); }; + /** + * Set popover option on $element + * + * @param {Object} $element + * @param {String} key + * @param {String} value + */ + Popover.setOption = function($element, key, value) { + $element.data('bs.popover').options[key] = value; + }; + /** * Show popover with title and content on $element *