mirror of
https://github.com/atom/atom.git
synced 2026-04-06 03:02:13 -04:00
Ensure 0-height editors are correctly detected as visible
This is unlikely but it’s easy enough to support Signed-off-by: Max Brunsfeld <maxbrunsfeld@github.com>
This commit is contained in:
committed by
Thomas Johansen
parent
25db2bad04
commit
cc4c437f3d
@@ -128,7 +128,8 @@ class TextEditorComponent
|
||||
|
||||
didAttach: ->
|
||||
@intersectionObserver = new IntersectionObserver((entries) =>
|
||||
if entries[entries.length - 1].intersectionRatio isnt 0
|
||||
{intersectionRect} = entries[entries.length - 1]
|
||||
if intersectionRect.width > 0 or intersectionRect.height > 0
|
||||
@becameVisible()
|
||||
)
|
||||
@intersectionObserver.observe(@domNode)
|
||||
|
||||
Reference in New Issue
Block a user