mirror of
https://github.com/chylex/TweetDuck.git
synced 2025-05-09 05:34:05 +02:00
Fix TweetDeck bug where docked composer loses focus after Alt+Tab
Closes #297
This commit is contained in:
parent
ab91540deb
commit
a0f8689d4f
@ -1068,6 +1068,29 @@
|
||||
});
|
||||
});
|
||||
|
||||
//
|
||||
// Block: Fix docked composer not re-focusing after Alt+Tab.
|
||||
//
|
||||
onAppReady.push(function fixDockedComposerRefocus(){
|
||||
$(document).on("tduckOldComposerActive", function(e){
|
||||
const ele = $$(".js-compose-text", ".js-docked-compose");
|
||||
const node = ele[0];
|
||||
|
||||
let cancelBlur = false;
|
||||
|
||||
ele.on("blur", function(e){
|
||||
cancelBlur = true;
|
||||
setTimeout(function(){ cancelBlur = false; }, 0);
|
||||
});
|
||||
|
||||
window.TDGF_prioritizeNewestEvent(node, "blur");
|
||||
|
||||
node.blur = prependToFunction(node.blur, function(){
|
||||
return cancelBlur;
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
//
|
||||
// Block: Refocus the textbox after switching accounts.
|
||||
//
|
||||
|
Loading…
Reference in New Issue
Block a user