jeffminsungkim / Ashy

0 stars 0 forks source link

Keyboard and text input loses focus when there's no message exists #19

Closed jeffminsungkim closed 6 years ago

jeffminsungkim commented 6 years ago

Version info

cli packages: (/usr/local/lib/node_modules)

@ionic/cli-utils  : 1.19.0
ionic (Ionic CLI) : 3.19.0

global packages:

cordova (Cordova CLI) : 7.1.0

local packages:

@ionic/app-scripts : 3.1.4
Cordova Platforms  : android 6.3.0 ios 4.5.4
Ionic Framework    : ionic-angular 3.9.2

System:

ios-deploy : 1.9.2
Node       : v8.9.0
npm        : 5.5.1
OS         : macOS High Sierra
Xcode      : Xcode 9.2 Build version 9C40b

Issue content

When there are no messages in a scroll-content, both keyboard and a text input lose focus. This issue has found during testing on iPhone SE (iOS 11) device.

Debug output

Expected behavior

The input and the keyboard should stay in focus until a user dismisses from typing messages.

Actual behavior

ios-keyboard-bug-3

jeffminsungkim commented 6 years ago

ios-keyboard-bug-fixed2

(touchstart)="touchSendButton($event)" and (mousedown)="touchSendButton($event)" won't help much. Instead, use (touchend)="touchSendButton($event)" and added event.stopPropagation(); inside of touchSendButton($event) method to stop event bubbling.