Community
Participate
Working Groups
When providing tooltip content through the hover service, you can include 'offsetStart' and 'offsetEnd' properties on the returned data object. This allows the contributor to specify the word range that the hover is anchored to. When it is not set, the tooltip service will guess what 'word' will be selected. We previously provided the information, but either with the introduction of Tern or the updated version of Tern, we have regressed. You can see the effect by having: /* * a */ function a(){ } Hovering on the right side of the 'a' will put the tooltip in the right place. Hovering on the left side of it will put the hover under 'function'.
http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=3b9ef134a69fd378447b67759acb35feb9300953 I put in some smarter logic in tooltip.js to select the current word rather than the previous word when hovering at the start. That will make the missing offsets less apparent in JS. However, we should still be providing a consistent offset range to anchor the hover, otherwise you get three different hover placements depending on whether 'function' 'a' or '()' is selected. Prior to Tern we always anchored the tooltip to the function name I believe.
This is a regression of Bug 462028.
(In reply to Curtis Windatt from comment #2) > This is a regression of Bug 462028. This has been fixed in the tooltip.js code to not rely on a service consumer to tell the tooltip where to show. Closing as 'fixed'