1
0
mirror of https://github.com/chylex/TweetDuck.git synced 2025-04-17 21:15:47 +02:00

Fix emoji keyboard not disappearing after pressing ctrl+enter to tweet

This commit is contained in:
chylex 2017-08-06 20:31:44 +02:00
parent 775f590bfa
commit c15f339718

View File

@ -225,6 +225,10 @@ enabled(){
} }
}; };
this.composerSendingEvent = function(e){
hideKeyboard();
};
this.documentClickEvent = function(e){ this.documentClickEvent = function(e){
if (me.currentKeyboard && !e.target.classList.contains("js-compose-text")){ if (me.currentKeyboard && !e.target.classList.contains("js-compose-text")){
hideKeyboard(); hideKeyboard();
@ -246,6 +250,8 @@ enabled(){
} }
ready(){ ready(){
this.composeDrawer = $("[data-drawer='compose']");
this.composePanelScroller = $(".js-compose-scroller", ".js-docked-compose").first().children().first(); this.composePanelScroller = $(".js-compose-scroller", ".js-docked-compose").first().children().first();
this.composePanelScroller.on("scroll", this.composerScrollEvent); this.composePanelScroller.on("scroll", this.composerScrollEvent);
@ -253,6 +259,7 @@ ready(){
$(document).on("click", this.documentClickEvent); $(document).on("click", this.documentClickEvent);
$(document).on("keydown", this.documentKeyEvent); $(document).on("keydown", this.documentKeyEvent);
$(document).on("uiComposeImageAdded", this.uploadFilesEvent); $(document).on("uiComposeImageAdded", this.uploadFilesEvent);
this.composeDrawer.on("uiComposeTweetSending", this.composerSendingEvent);
// HTML generation // HTML generation
@ -373,5 +380,7 @@ disabled(){
$(document).off("click", this.documentClickEvent); $(document).off("click", this.documentClickEvent);
$(document).off("keydown", this.documentKeyEvent); $(document).off("keydown", this.documentKeyEvent);
$(document).off("uiComposeImageAdded", this.uploadFilesEvent); $(document).off("uiComposeImageAdded", this.uploadFilesEvent);
this.composeDrawer.off("uiComposeTweetSending", this.composerSendingEvent);
TD.mustaches["compose/docked_compose.mustache"] = this.prevComposeMustache; TD.mustaches["compose/docked_compose.mustache"] = this.prevComposeMustache;
} }