Focus on filename after selecting file.
This commit is contained in:
parent
fa7eb381a1
commit
ee6591c3c8
@ -326,6 +326,7 @@ QR =
|
|||||||
handleUrl: ->
|
handleUrl: ->
|
||||||
url = prompt 'Enter a URL:'
|
url = prompt 'Enter a URL:'
|
||||||
return if url is null
|
return if url is null
|
||||||
|
QR.nodes.fileButton.focus()
|
||||||
CrossOrigin.file url, (blob) ->
|
CrossOrigin.file url, (blob) ->
|
||||||
if blob
|
if blob
|
||||||
QR.handleFiles([blob])
|
QR.handleFiles([blob])
|
||||||
@ -341,6 +342,8 @@ QR =
|
|||||||
for file in files
|
for file in files
|
||||||
QR.handleFile file, files.length
|
QR.handleFile file, files.length
|
||||||
$.addClass QR.nodes.el, 'dump' unless files.length is 1
|
$.addClass QR.nodes.el, 'dump' unless files.length is 1
|
||||||
|
if d.activeElement is QR.nodes.fileButton and $.hasClass QR.nodes.fileSubmit, 'has-file'
|
||||||
|
QR.nodes.filename.focus()
|
||||||
|
|
||||||
handleFile: (file, nfiles) ->
|
handleFile: (file, nfiles) ->
|
||||||
isText = /^text\//.test file.type
|
isText = /^text\//.test file.type
|
||||||
@ -355,6 +358,7 @@ QR =
|
|||||||
openFileInput: ->
|
openFileInput: ->
|
||||||
return if QR.nodes.fileButton.disabled
|
return if QR.nodes.fileButton.disabled
|
||||||
QR.nodes.fileInput.click()
|
QR.nodes.fileInput.click()
|
||||||
|
QR.nodes.fileButton.focus()
|
||||||
|
|
||||||
generatePostableThreadsList: ->
|
generatePostableThreadsList: ->
|
||||||
return unless QR.nodes
|
return unless QR.nodes
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user