From ff40474f921d9047fdc66c773f26e6dad021cb25 Mon Sep 17 00:00:00 2001
From: chylex <info@chylex.com>
Date: Thu, 6 Apr 2017 18:39:47 +0200
Subject: [PATCH] Fix DM reply input not getting focused after opening a
 conversation

---
 Resources/Scripts/code.js | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/Resources/Scripts/code.js b/Resources/Scripts/code.js
index de04dad2..1a15ad50 100644
--- a/Resources/Scripts/code.js
+++ b/Resources/Scripts/code.js
@@ -647,6 +647,15 @@
   TD.services.TwitterMedia.YOUTUBE_RE = new RegExp(TD.services.TwitterMedia.YOUTUBE_LONG_RE.source+"|"+TD.services.TwitterMedia.YOUTUBE_TINY_RE.source);
   TD.services.TwitterMedia.SERVICES["youtube"] = TD.services.TwitterMedia.YOUTUBE_RE;
   
+  //
+  // Block: Fix DM reply input box not getting focused after opening a conversation.
+  //
+  TD.components.ConversationDetailView.prototype.showChirp = appendToFunction(TD.components.ConversationDetailView.prototype.showChirp, function(){
+    setTimeout(function(){
+      $(".js-reply-tweetbox").first().focus();
+    }, 100);
+  });
+  
   //
   // Block: Disable TweetDeck metrics.
   //