Focus while upload.
This commit is contained in:
parent
b0666a0090
commit
707788583a
src/snek
@ -49,6 +49,8 @@ class UploadButtonElement extends HTMLElement {
|
||||
};
|
||||
|
||||
request.send(formData);
|
||||
const uploadEvent = new Event('upload',{});
|
||||
this.dispatchEvent(uploadEvent);
|
||||
}
|
||||
channelUid = null
|
||||
connectedCallback() {
|
||||
|
@ -30,7 +30,7 @@
|
||||
function getInputField(){
|
||||
return document.querySelector("textarea")
|
||||
}
|
||||
|
||||
|
||||
function initInputField(textBox) {
|
||||
textBox.addEventListener('keydown', (e) => {
|
||||
if (e.key === 'Enter' && !e.shiftKey) {
|
||||
@ -42,7 +42,9 @@
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
document.querySelector("upload-button").addEventListener("upload",function(e){
|
||||
getInputField().focus();
|
||||
})
|
||||
textBox.addEventListener("paste", async (e) => {
|
||||
try {
|
||||
const clipboardItems = await navigator.clipboard.read();
|
||||
|
Loading…
Reference in New Issue
Block a user