Skip to content

Commit

Permalink
proper unfocusing
Browse files Browse the repository at this point in the history
  • Loading branch information
dimdenGD committed Oct 18, 2022
1 parent a1c080a commit 8163282
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions layouts/home/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -651,12 +651,18 @@ setTimeout(async () => {
document.getElementById('wtf-refresh').addEventListener('click', async () => {
renderDiscovery(false);
});
document.getElementById('new-tweet').addEventListener('click', async () => {
let newTweetUserSearch = document.getElementById("new-tweet-user-search");
let newTweetText = document.getElementById('new-tweet-text');
let newTweetButton = document.getElementById('new-tweet-button');
document.getElementById('new-tweet').addEventListener('click', async e => {
document.getElementById('new-tweet-focused').hidden = false;
document.getElementById('new-tweet-audience').hidden = false;
document.getElementById('new-tweet-char').hidden = false;
document.getElementById('new-tweet-text').classList.add('new-tweet-text-focused');
document.getElementById('new-tweet-media-div').classList.add('new-tweet-media-div-focused');
if(e.target !== newTweetText) {
newTweetText.dataset.blurSince = Date.now();
}
});
document.getElementById('new-tweet').addEventListener('drop', e => {
document.getElementById('new-tweet').click();
Expand Down Expand Up @@ -733,9 +739,6 @@ setTimeout(async () => {
pollToUpload = undefined;
getMedia(mediaToUpload, document.getElementById('new-tweet-media-c'));
});
let newTweetUserSearch = document.getElementById("new-tweet-user-search");
let newTweetText = document.getElementById('new-tweet-text');
let newTweetButton = document.getElementById('new-tweet-button');
let selectedIndex = 0;
newTweetText.addEventListener('focus', async e => {
setTimeout(() => {
Expand Down

0 comments on commit 8163282

Please sign in to comment.