@@ -393,32 +393,29 @@ extension MessageInputBar: UITextViewDelegate {
393393 }
394394
395395 public override func hitTest( _ point: CGPoint , with event: UIEvent ? ) -> UIView ? {
396- // let convertedPoint = self.convert(point, from: self.superview)
397- if self . point ( inside: point, with: event) {
398- for view in subviews {
399- if view. isKind ( of: type ( of: view) ) , view. frame. contains ( point) {
400- if view is MessageInputEmojiView , view. isHidden {
401- if !self . extensionMenus. isHidden {
402- let childPoint = self . convert ( point, to: self . extensionMenus)
403- let childView = self . extensionMenus. hitTest ( childPoint, with: event)
404- return childView
405- }
396+
397+ for view in subviews {
398+ if view. isKind ( of: type ( of: view) ) , view. frame. contains ( point) {
399+ if view is MessageInputEmojiView , view. isHidden {
400+ if !self . extensionMenus. isHidden {
401+ let childPoint = self . convert ( point, to: self . extensionMenus)
402+ let childView = self . extensionMenus. hitTest ( childPoint, with: event)
403+ return childView
406404 }
407- if view is MessageInputExtensionView , view . isHidden {
408- if ! ( self . emoji ? . isHidden ?? true ) {
409- let childPoint = self . convert ( point , to : self . emoji)
410- let childView = self . emoji ? . hitTest ( childPoint , with : event )
411- return childView
412- }
405+ }
406+ if view is MessageInputExtensionView , view . isHidden {
407+ if ! ( self . emoji? . isHidden ?? true ) {
408+ let childPoint = self . convert ( point , to : self . emoji )
409+ let childView = self . emoji ? . hitTest ( childPoint , with : event )
410+ return childView
413411 }
414- let childPoint = self . convert ( point, to: view)
415- let childView = view. hitTest ( childPoint, with: event)
416- return childView
417412 }
413+ let childPoint = self . convert ( point, to: view)
414+ let childView = view. hitTest ( childPoint, with: event)
415+ return childView
418416 }
419- } else {
420- self . hiddenInput ( )
421417 }
418+ self . hiddenInput ( )
422419 self . attachment. isSelected = false
423420 self . emoji? . isHidden = true
424421 self . extensionMenus. isHidden = true
0 commit comments