Skip to content

Fix issues related to title and html props#114

Open
brien-givens wants to merge 1 commit into
tvkhoa:masterfrom
brien-givens:fix-title-and-html-issues
Open

Fix issues related to title and html props#114
brien-givens wants to merge 1 commit into
tvkhoa:masterfrom
brien-givens:fix-title-and-html-issues

Conversation

@brien-givens

@brien-givens brien-givens commented May 19, 2019

Copy link
Copy Markdown

Description

I noticed that react-tippy wasn't working on IE11. I was getting this error message:

[getPopperElement]: Element passed as the argument does not exist in the instance

Digging in, I discovered that this line seemed partly responsible: if the title prop is null, IE 11 sets the attribute to "" whereas all other browsers actually set the attribute to "null". In createTooltips, this predicate looks for a truthy title attribute or html setting. The predicate is essentially skipped for all browsers aside from IE 11 (unless "" was explicitly passed in as the title) since "null" is not falsy.

The other problem with this predicate is that it is checking the html setting which does not seem to be the intent, since the html prop is stored as the reactDOM setting on this line. Also, the html setting was introduced in this changeset line which does not touch the predicate in createTooltips.

These changes fix the IE 11 issue for me; they also do not affect the behavior in other browsers and the test app works.

@Merbs

Merbs commented Mar 5, 2020

Copy link
Copy Markdown

@tvkhoa any interest in merging/releasing this?

@tuanthieu2993

Copy link
Copy Markdown
Contributor

@Merbs @brien-givens sorry for late reply, those all changes and fixes should be included in the latest changes (along with the upgrade to 16.x React), please check if that suit your case?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants