I extended sap.ui.core.TooltipBase with mouseover event handling which is attached to some sap.ui.core.Icon in the ChartContainer:
sap.ui.define(function () {
"use strict";
return sap.ui.core.TooltipBase.extend("dvd.rl.component.ChartContainer.parts.TooltipBase.TooltipBase", {
metadata: {
events: {
"onmouseover" : {}
}
},
oView: null,
setView : function(view){
this.oView = view;
},
// the hover event handler, it is called when the Button is hovered - no event registration required
onmouseover : function() {},
});
Everythink works well, but when I click on the Icon in the ChartContainer I got this error from the TooltipBaseRenderer.js (This happens before handling of press event.):
In the TooltipBaseRenderer.js it is this line:

I have no idea what is going on there. If you will have I will be happy to hear it.
This is how I added TooltipBase to sap.ui.core.Icon:
// Add custom Icon for filter
var oFilterIcon = new sap.ui.core.Icon("filterButton", {
tooltip : "{i18n>filter}",
src : "sap-icon://filter",
press : [this.onHandleLocalFilterOpen,this]
});
// Add Icon to chart component
oChartContainer.addCustomIcon(oFilterIcon);
var oTooltipBase = new TooltipBase();
// set new TooltipBase to Icon
oFilterIcon.setTooltip(oTooltipBase);
EDITED 12:15 100117:
When I use renderer in the TooltipBase.extend:
//just inherit the renderer as it is
renderer: {},
I got this error:

So I removed renderer, and TooltipBase works when I hover over Icon. The problem is when I click on the Icon as I described higher.
Here is a working sample custom tooltip extended from sap/ui/core/TooltipBase.
Make sure that your renderer has the render method. Otherwise UI5 will look for it at the parent. Also TooltipBase already handles the mouse events. No need to handle them in your extension.
This is what happened:
render function (renderer: { }).render in the parent renderer (sap/ui/core/TooltipBaseRenderer).TooltipBaseRenderer.js since TooltipBase is an abstract control. Abstract controls have no renderer (renderer: null // not undefined in their definition).Usually, UI5 bypasses fetching the renderer for abstract controls but the TooltipBase was unfortunately missing the renderer: null. So UI5 assumed that there must be a file named TooltipBaseRenderer.js which resulted in the 404 error. As of UI5 1.82, the TooltipBase has renderer: null, so the issue is no longer reproducible.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With