Ref T4714, fixing tooltips not appearing in editor when in fullscreen mode
- Group Reviewers
- Maniphest Tasks
- T4714: Tooltips do not appear in when editor is in fullscreen mode
- Restricted Diffusion Commit
rPcbfa99174eb7: Fixing tooltips not appearing in fullscreen editor
Create paste, verify tooltips appear in comment text-editing bar, make comment box fullscreen, verify tooltips still appear.
Looks mostly good, but see some inlines.
We should move this to the bottom of the file so the tips remain in sorted order.
Since a is a JX.Vector, you can simplify this slightly:
Also, consider a more meaningful name for the variable a.
Since this method isn't meant to be called from outside of JX.Tooltip, preface the method name with an underscore: _getPosition
This looks like debugging code.
(Leftover debugging code.)
I don't think this is worth adjusting since no one will ever hit it (at least, we can wait for someone to complain), but since we're only looking at one position (the top left corner of the tip), this could give us the wrong result for some tips. Fore example, if if the thing being tipped is near the bottom of the screen and the tip has "S" alignment, the top left corner of the tip might be visible, but most of the tip text might not be.
If we wanted to be perfect here, we could check that all four corners of the tip are on screen.
This will always be true unless a.y == s.y and a.x == s.x, so I think something is off here.