mirror of
https://github.com/mastodon/mastodon.git
synced 2024-11-30 16:41:55 +00:00
Remove code for giving focus to first media without description
Since the textarea is in a modal, now…
This commit is contained in:
parent
df150da435
commit
dff4ccd7e9
|
@ -121,13 +121,6 @@ class ComposeForm extends ImmutablePureComponent {
|
||||||
|
|
||||||
// Submit unless there are media with missing descriptions
|
// Submit unless there are media with missing descriptions
|
||||||
if (mediaDescriptionConfirmation && onMediaDescriptionConfirm && media && media.some(item => !item.get('description'))) {
|
if (mediaDescriptionConfirmation && onMediaDescriptionConfirm && media && media.some(item => !item.get('description'))) {
|
||||||
const firstWithoutDescription = media.findIndex(item => !item.get('description'));
|
|
||||||
if (uploadForm) {
|
|
||||||
const inputs = uploadForm.querySelectorAll('.composer--upload_form--item input');
|
|
||||||
if (inputs.length == media.size && firstWithoutDescription !== -1) {
|
|
||||||
inputs[firstWithoutDescription].focus();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
onMediaDescriptionConfirm(this.context.router ? this.context.router.history : null);
|
onMediaDescriptionConfirm(this.context.router ? this.context.router.history : null);
|
||||||
} else if (onSubmit) {
|
} else if (onSubmit) {
|
||||||
onSubmit(this.context.router ? this.context.router.history : null);
|
onSubmit(this.context.router ? this.context.router.history : null);
|
||||||
|
|
Loading…
Reference in a new issue