mirror of
https://github.com/atom/atom.git
synced 2026-02-10 22:55:09 -05:00
Implement detachment to eliminate spurious drag events
This commit is contained in:
committed by
Antonio Scandurra
parent
173cdcb372
commit
ebad2e6605
@@ -599,7 +599,18 @@ class TextEditorComponent {
|
||||
}
|
||||
})
|
||||
this.intersectionObserver.observe(this.element)
|
||||
if (this.isVisible()) this.didShow()
|
||||
if (this.isVisible()) {
|
||||
this.didShow()
|
||||
} else {
|
||||
this.didHide()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
didDetach () {
|
||||
if (this.attached) {
|
||||
this.didHide()
|
||||
this.attached = false
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user