FLUID-6512: Orator play button may accidentally submit form

Metadata

Source
FLUID-6512
Type
Bug
Priority
Major
Status
Closed
Resolution
Fixed
Assignee
N/A
Reporter
Gregor Moss
Created
2020-06-02T18:50:59.653-0400
Updated
2020-06-03T10:42:15.160-0400
Versions
N/A
Fixed Versions
N/A
Component
  1. Self Voicing

Description

When in the Story Edit page on the Storytelling Tool staging site, if I select a piece of text, the Orator will appear and offer to play it using the selectionReader. If that piece of text happens to be within the <form> element of the editor (i.e. the block editing or metadata areas), then clicking "Play" submits the form and reloads the page.

To reproduce:

  1. Go to the Storytelling Tool staging site's Edit page: https://staging-stories.floeproject.org/storyEdit.html
  2. Select a piece of text within the "Story Builder" area in the middle of the page (see screenshots for examples)
  3. Click "Play" on the selectionReader

Expected:

The text is voiced by the Orator

Actual:

The form is submitted

Proposed fix:

The Play button should be updated to make it a "button" type button. I.e. on this line of the component configuration that defines the markup for the selectionReader, the "type" attribute should be specified (see "2020-06-02 orator bug fix.png" for an example). This is because if the "type" attribute is missing, the default behaviour is to submit the form.

Environments

Windows 10 Pro v1909
Chrome 83
Storytelling Tool

Attachments

Comments

  • Cindy Li commented 2020-06-03T10:42:15.156-0400

    The pull request for fixing this issue has been merged into the project repo master branch at this commit.