Skip to content
This repository has been archived by the owner on Mar 3, 2023. It is now read-only.

Commit

Permalink
improved chat page, input doesn't lose focus and keyboard stays app o…
Browse files Browse the repository at this point in the history
…n send
  • Loading branch information
smukov committed Sep 10, 2016
1 parent 919d6dd commit 220a589
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Ionic/app/pages/chatPage/chatPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,8 @@ export class ChatPage {
}

sendMessage(){
this.txtChat.setFocus();

this.messages.push({
img: 'build/img/hugh.png',
position: 'right',
Expand Down
4 changes: 4 additions & 0 deletions Ionic/app/pages/components/elasticTextarea.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,8 @@ export class ElasticTextarea {
this.content = "";
this.txtArea.style.height = this.lineHeight + "px";
}

setFocus(){
this.ionTxtArea.setFocus()
}
}
1 change: 1 addition & 0 deletions Ionic/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
<preference name="DisallowOverscroll" value="true"/>
<preference name="android-minSdkVersion" value="16"/>
<preference name="BackupWebStorage" value="none"/>
<preference name="KeyboardDisplayRequiresUserAction" value="false" />
<feature name="StatusBar">
<param name="ios-package" onload="true" value="CDVStatusBar"/>
</feature>
Expand Down

0 comments on commit 220a589

Please sign in to comment.