Extended `sap.ui.core.TooltipBase`: delegate event handlers tightly coupled with the tooltip owner
@AndreHofeditz is already working on this.
Since Mar 23, 2026.
- Dominant language
- JavaScript
- Stars
- 3.3k
- Forks
- 1.3k
- PR merge metrics
- No merged PRs in 30d
Description
Recently I discovered that:
- Framework hooks, such as
onlocalizationChangedandonThemeChanged, are triggered twice. - Other pseudo or browser events, such as
onfocusin, are handled in the custom tooltip control for the tooltip owner control as well.
URL (minimal example if possible)
https://embed.plnkr.co/33zFqa?show=control%2FTooltip.js,preview
Steps to reproduce the problem:
- Open the above sample.
- Right-click on the preview and inspect the element to open the browser console.
- Enter
- Either
sap.ui.getCore().applyTheme("sap_belize");in order to triggeronThemeChanged - Or
sap.ui.getCore().getConfiguration().setLanguage(<lang-code>);in order to triggeronlocalizationChanged.
- Either
Any other information? (attach screenshot if possible)
When a tooltip is being set, the parent control calls _refreshTooltipBaseDelegate:
In _refreshTooltipBaseDelegate, the tooltip instance itself is added as a degelate (this.addDelegate(oTooltip)):
This causes triggering the hooks twice in _handleEvent when, for example, the theme has changed:
Given sHandlerName === "onThemeChanged":
- In
this[sHandlerName]()whereasthis=== the custom tooltip control - In
oDelegate[sHandlerName].call(/*...*/)whereasthat=== the tooltip owner control
Why is the tooltip object added as a delegate in the first place? That was not clear from the source code.
It would be nice if the hooks could be triggered only once, and other on... event handlers working independently from the tooltip owner control.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.