mirror of
https://github.com/chylex/TweetDuck.git
synced 2024-11-23 17:42:46 +01:00
16 lines
447 B
JavaScript
16 lines
447 B
JavaScript
import { $, ensureEventExists } from "../api/jquery.js";
|
|
import { onAppReady } from "../api/ready.js";
|
|
|
|
/**
|
|
* Refocuses composer input after uploading an image.
|
|
*/
|
|
export default function() {
|
|
onAppReady(function focusComposerAfterImageUpload() {
|
|
ensureEventExists(document, "uiComposeImageAdded");
|
|
|
|
$(document).on("uiComposeImageAdded", function() {
|
|
document.querySelector(".js-docked-compose .js-compose-text").focus();
|
|
});
|
|
});
|
|
};
|