WordPress.org

Make WordPress Core

Opened 7 years ago

Closed 6 years ago

#8557 closed defect (bug) (fixed)

Uploader: unexpected result during submit via "enter" key

Reported by: abackstrom Owned by:
Milestone: 2.9 Priority: normal
Severity: normal Version: 2.7
Component: Upload Keywords: has-patch commit
Focuses: Cc:

Description

Upload a file, then navigate down to the file information that appears below the "Select Files" button. If you submit the form by pressing enter (return) in one of the text fields, the "From Computer" tab redisplays with the error message "No file was uploaded." If you submit the form via the "Save all changes" button, the "Gallery" tab is shown. I would say the latter is the expected behavior.

In Firefox, submit via "enter" uses the first submit button, which happens to be the HTML uploader, hence the "no files uploaded" message. The quick fix is to make a hidden copy of the "Save all changes" button just after the <form> tag. I'm sure someone else can come up with a more elegant solution. =)

Attachments (3)

media.php.diff (685 bytes) - added by abackstrom 7 years ago.
media.php.2.diff (607 bytes) - added by abackstrom 6 years ago.
Revised patch.
8557_xhtml.patch (610 bytes) - added by nacin 6 years ago.
Formats tag in XHTML

Download all attachments as: .zip

Change History (14)

@abackstrom7 years ago

comment:1 @abackstrom7 years ago

  • Milestone 2.7.1 deleted
  • Summary changed from Uploader: submit via enter/return different than submit via button to Uploader: unexpected result during submit via "enter" key

comment:2 @abackstrom6 years ago

  • Version set to 2.7

comment:3 @Denis-de-Bernardy6 years ago

  • Component changed from Upload to JavaScript
  • Keywords has-patch dev-feedback added
  • Milestone set to 2.8
  • Owner set to azaozz

Forwarding to JS, as I suspect this actually is related to that.

comment:4 @Denis-de-Bernardy6 years ago

  • Milestone changed from 2.8 to Future Release

broken patch

comment:5 @Denis-de-Bernardy6 years ago

  • Keywords needs-patch added; has-patch dev-feedback removed

@abackstrom6 years ago

Revised patch.

comment:6 @abackstrom6 years ago

  • Keywords has-patch needs-testing added; needs-patch removed

comment:7 @abackstrom6 years ago

  • Cc abackstrom added

comment:8 @Denis-de-Bernardy6 years ago

  • Component changed from JavaScript to Upload
  • Milestone changed from Future Release to 2.9
  • Owner azaozz deleted

comment:9 @azaozz6 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [12240]) Submit the "Save all changes" form by pressing Enter, props abackstrom, fixes #8557

@nacin6 years ago

Formats tag in XHTML

comment:10 @nacin6 years ago

  • Keywords commit added; needs-testing removed
  • Resolution fixed deleted
  • Status changed from closed to reopened

Patch to convert tag to XHTML.

comment:11 @azaozz6 years ago

  • Resolution set to fixed
  • Status changed from reopened to closed

(In [12283]) Fix typo, props nacin, fixes #8557

Note: See TracTickets for help on using tickets.