stevenbenner / jquery-powertip

:speech_balloon: A jQuery plugin that creates hover tooltips.
https://stevenbenner.github.io/jquery-powertip/
MIT License
821 stars 137 forks source link

Bug/old doctype positioning patch #155

Closed jasco closed 7 years ago

jasco commented 7 years ago

When in BackCompat mode the viewport size was not reported correctly.

This is a patch I created some time ago to fix a problem identified during use. It could probably use a test case to support it.

stevenbenner commented 7 years ago

Quirks mode is a big can of worms that's probably best left unopened. Is this just for the case where the web page has a missing/invalid doctype statement?

I think I'll pass on this one, primarily because if jQuery doesn't support quirks mode then there isn't much reason for a jQuery plugin to support quirks mode. If I start seeing quirks mode bugs, with a decent excuse for why the developer can't introduce a valid HTML doctype statement, then I'll consider pulling this in.

If this is for some bug that people are likely to run into then please let me know and I'll reconsider.

jasco commented 7 years ago

This is more than just missing/invalid. Some valid, older doctype's trigger this behavior too.

I use this library in a browser extension so I have to cope with HTML in the wild over which I do not have control. So far I have had pretty good results after changes like this one. I understand if the use case is outside that officially supported by the library.