| Summary: | Code Edit Widget: Content assist dialog should adjust the tooltips position after it is resized. | ||
|---|---|---|---|
| Product: | [ECD] Orion | Reporter: | libing wang <libingw> |
| Component: | Client | Assignee: | libing wang <libingw> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | curtis.windatt.public, emoffatt |
| Version: | 10.0 | ||
| Target Milestone: | 10.0 | ||
| Hardware: | PC | ||
| OS: | Windows 7 | ||
| Whiteboard: | |||
| Bug Depends on: | 468555 | ||
| Bug Blocks: | 482522 | ||
|
Description
libing wang
The tooltip will recognize the size change if you switch proposals. It looks like there is no straightforward way to listen for a resize event. Eric mentioned there was some way to recognize it, but it had very poor performance implications. first cut of the fix with http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=1afbd0d15e3ac6b5a85a50e25300ef5626f2535. Will need to refine something in the TODO list inside contentAssit.js I thought mutation observers weren't typically used due to performance concerns: https://developers.google.com/web/updates/2012/02/Detect-DOM-changes-with-Mutation-Observers?hl=en Or is my knowledge way out of date? Also, your TODO mentions just updating the size/position of the tooltip. By passing true to _showTooltip, it should be calling tooltip.update(target). update (vs show) is doing exactly that, only updating the positioning of the tooltip, not recreating contents. (In reply to Curtis Windatt from comment #3) > I thought mutation observers weren't typically used due to performance > concerns: > https://developers.google.com/web/updates/2012/02/Detect-DOM-changes-with- > Mutation-Observers?hl=en > > Or is my knowledge way out of date? > we only use it for FF. maybe we should just use timer for all browsers? > Also, your TODO mentions just updating the size/position of the tooltip. By > passing true to _showTooltip, it should be calling tooltip.update(target). > update (vs show) is doing exactly that, only updating the positioning of the > tooltip, not recreating contents. That is what I thought at beginning. I thought tooltip.update(target) should not recreate contents but I just want to be cautious. Will double check tomorrow. Here's a tweak that allows us to skip the information gathering step and just update the tooltip's position. http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=fdc4582e3ac6e9093e99f22d7b2dfddc23c5ac26 fixed. |