Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The Arrows are not visible in IE8 #83

Closed
dev-bjoern opened this issue Jun 9, 2013 · 6 comments
Closed

The Arrows are not visible in IE8 #83

dev-bjoern opened this issue Jun 9, 2013 · 6 comments
Assignees
Labels
Bug Software defects or other problems that should be fixed.
Milestone

Comments

@dev-bjoern
Copy link

It seems, that IE8 has some problem with rendering pseudoelements(the arrows) of elements that are inserted by javascript...

A possible solution is documented here: http://stackoverflow.com/a/8852418/228450

@dev-bjoern
Copy link
Author

Alright, I just tested the proposed solution and it works :).

So to be more clear, you just have to give
#powerTip:before {
content: "x"
}

and all the other id selectors
content: "xx"

Substitue one x for one space, it wont show correctly here.

@stevenbenner
Copy link
Owner

How can I reproduce this problem?

I'll admit that I test IE8 support by setting IE10 to "IE8 mode", but I don't have any problem seeing the arrows. It is possible that there are some issues that may require a real IE8 install to test.

@dev-bjoern
Copy link
Author

Its visible in a "real" IE8 e.g. in the "Placement examples" on the project site http://stevenbenner.github.io/jquery-powertip/
Just hover over one of the divs, you´ll see the arrow is missing in IE8. I use a local virtual machine, but you could glimpse via https://www.browserstack.com/users/sign_up trial.

@stevenbenner
Copy link
Owner

I downloaded the IE8 testing VM environment from Microsoft and am seeing exactly the same problem as you.

The fix does work, but it is really ugly. I want to dig a little deeper and see if I can find any other alternative solutions.

@stevenbenner
Copy link
Owner

I've finally had a chance to revisit this issue. I think I've found a better way to force IE8 to repaint the arrows without adding 12 more CSS rules with the unique repeated spaces hack.

If I set the CSS content to use attr(class) it does seem to force IE8 to redraw the pseudo elements every time. Luckily IE8 does support the attr function. It's hacky, but doesn't bloat the CSS nearly as much.

So in the end the CSS I'm looking at is this:

#powerTip:before {
    content: attr(class) " ";
    position: absolute;
    height: 0;
    width: 0;
    text-indent: 100%;
    overflow: hidden;
}

This adds the current class (which tooltips with arrows will always have) as content text, then hides that text by indenting it into the overflow region.

If anyone with an IE8 testing box sees this comment please try it out and let me know if it works for you. Right now I just have my IE8 virtual machine and it seems to resolve the issue.

@stevenbenner stevenbenner added this to the 1.3.1 milestone Mar 17, 2014
@stevenbenner stevenbenner self-assigned this Mar 26, 2018
stevenbenner added a commit that referenced this issue Mar 26, 2018
This appends the current tooltip position class to the :before
pseudo element content, forcing IE8 to notice that the content has
changed and trigger a redraw of the element.

For issue #83.
stevenbenner added a commit that referenced this issue Mar 26, 2018
@stevenbenner
Copy link
Owner

This should be resolved, or at least hopefully improved by commit 2ca0cd1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Software defects or other problems that should be fixed.
Projects
None yet
Development

No branches or pull requests

2 participants