Bug #95357 Query result grid tooltip issues
Submitted: 13 May 2019 14:08 Modified: 14 May 2019 17:06
Reporter: Jason Brunette Email Updates:
Status: Verified Impact on me:
Category:MySQL Workbench Severity:S3 (Non-critical)
Version:8.0.16 OS:Any
Assigned to: CPU Architecture:Any

[13 May 2019 14:08] Jason Brunette
Bug 93541 attempted to address an issue with scrollwheel events not triggering scrolling in Workbench.  There are still issues in the query results grid.

1. Tooltip positioning is now erratic, unpredictable.  It occasionally appears left of the cursor, or far to the right... and sometimes a good deal above or below the cursor.  More often than not, it appears immediately under the cursor, causing the cursor itself to obscure the beginning of the value.

2. Scrollwheel events are still stolen by the tooltip object if the tooltip happens to be rendered under the cursor pointer.  Bug 93541 makes this less likely to be triggered but doesn't correct the underlying defect.

How to repeat:
1. Run a SQL query that produces result rows.
2. Hover mouse over cells randomly.
3. Observe unpredictable tooltip positioning.
4. For some row cells, especially those with very long values, the tooltip will be positioned under the cursor, preventing scrollwheel events from being received by the result grid.

Suggested fix:
Fix tooltips. See Bug 92989 for more tooltip fun.

1. Position them predictably and consistently with common tooltip positioning conventions (left aligned with left side of cursor, top aligned with bottom of cursor + 3px or so) when possible (handle positioning of very large tooltips gracefully... or limit their size (see Bug 92989)).  See tooltips in any Windows web browser.
2. Prevent tooltip object from stealing events from its underlying grid.
[13 May 2019 14:48] MySQL Verification Team
Thank you for the bug report. Are you able to provide a screenshot of the issue?. Thanks.
[13 May 2019 15:06] Jason Brunette
Tooltip positioning examples

Attachment: mysql workbench.png (image/png, text), 21.14 KiB.

[13 May 2019 15:07] Jason Brunette
Above are examples of tooltip positioning when the cursor hovered over the cells.  The cursor was stopped over a cell and the resulting tooltip was SS'd.
[14 May 2019 16:42] MySQL Verification Team
Thank you for the feedback.
[14 May 2019 17:06] Jason Brunette
Ok, I'm pretty sure I know the cause.  It appears that tooltip processing is invoked immediately upon the cursor entering the cell, rather than x milliseconds after the cursor has stopped moving within the cell.

1. Move cursor over cell in populated result grid.
2. Continue to move cursor within cell.
3. Tooltip appears, even though cursor hasn't stopped moving.

Further evidence of this is that the tooltip's top-left corner will be positioned at the location in the cell where the cursor first entered the cell.  This explains the erratic positioning of the tooltip.