refactor: change disabling propagation condition
This commit is contained in:
parent
3e64b5cc4e
commit
8655c90f1d
|
|
@ -141,9 +141,9 @@ open class StatefulButton: UIButton {
|
|||
|
||||
let touchEventReceiver = super.hitTest(point, with: event)
|
||||
|
||||
let shouldPropagateEvent = eventPropagations[state] ?? true
|
||||
let shouldPropagateEvent = (eventPropagations[state] ?? true) || isHidden
|
||||
|
||||
if pointInsideView && touchEventReceiver == nil && !shouldPropagateEvent && !isHidden {
|
||||
if pointInsideView && touchEventReceiver == nil && !shouldPropagateEvent {
|
||||
return self // disable propagation
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue