Last Updated: 06 Jul 2021 10:47 by ADMIN
Release 2.26.0
Created on: 19 May 2021 12:11
Category: Tooltip
Type: Bug Report
ToolTip with no TargetSelector throws a JavaScript error

A ToolTip will trigger a JavaScript error in the following scenarios:

  • There is no TargetSelector.
  • The TargetSelector does not match any elements on the page.

The JS error is thrown on mouse click:

TypeError: undefined is not an object (evaluating 't.getAttribute')


Marin Bratanov
Posted on: 25 May 2021 06:11

Hi Vaughan,

Indeed, this is the second case that throws an error. You could avoid it by wrapping the tooltip component in an @if-block so it initializes only when those elements are also initialized, you should be able to reuse the same conditional logic.

Marin Bratanov
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Posted on: 25 May 2021 05:57
The TargetSelector does not match any elements on the page is an issue for me too, as I have optional elements that need tooltips. I'm receiving this error when none of these elements happen to be rendered.
Posted on: 19 May 2021 12:18

Hello Pablo,

Thank you for bringing this issue to our attention. Normally, TargetSelector should be used, otherwise the ToolTip will be unusable. Nevertheless, we should not throw a JS error, so we will fix this.

Progress Telerik

Тhe web is about to get a bit better! 

The Progress Hack-For-Good Challenge has started. Learn how to enter and make the web a worthier place: