Dj-Viking/Nomad-Lang
FE [bug]: Tooltips appearing when they don't necessarily need to
Open
#79 opened on Jul 24, 2022
FrontEndbuggood first issue
Repository metrics
- Stars
- (1 star)
- PR merge metrics
- (No merged PRs in 30d)
Description
here's an example. the main reason is because the code responsible for applying the tooltip text to the button is checking the length of the string being input to the choice button instead of how many words are in the string.
feel free to experiment with different sizes of answer texts that are inserted to the choice buttons and adjust the limits in the if statement check.
I have an idea that we can check for both conditions for example:
const str_len = str.split("").length;
const words_amount = str.split(" ").length;
if (str_len >= 8 && words_amount >= 5) {
// apply tooltip to the element
}