mirror of
https://github.com/atom/atom.git
synced 2026-01-23 13:58:08 -05:00
Make focus state distinct until changed on Focusable objects
This commit is contained in:
@@ -8,6 +8,7 @@ class Focusable extends Mixin
|
||||
@$focusContext
|
||||
.flatMapLatest((context) -> context?.$focusedObject)
|
||||
.map((focusedObject) => focusedObject is this)
|
||||
.distinctUntilChanged()
|
||||
|
||||
focus: ->
|
||||
throw new Error("Object must be assigned a focusContext to be focus") unless @focusContext
|
||||
|
||||
Reference in New Issue
Block a user