Skip to content

Clicking "reconnect" after device disconnection while connection modal is open has bad results #3699

@ericrosenbaum

Description

@ericrosenbaum

Expected Behavior

It's not clear to me what should happen when you have the device connection modal open for one hardware extension, but you have a disconnection alert visible for a different hardware extension, and you click the "reconnect" button on the alert. Probably it should cancel whatever the connection modal was doing at that point such as connecting or scanning, and start the new process, such as scanning for a different device type.

Actual Behavior

Currently, you can get into a broken state. For example, if you connect to a microbit, then scan for EV3, turn off the microbit, then click "reconnect" on the microbit alert, the EV3 modal will stay open. If you then click "connect" on an EV3 in the list, it will hang and fail to connect:

reconnect-bug

Sort of related to #3685

Steps to Reproduce

  • Connect to a microbit
  • Disconnect it, triggering the alert, but leave the alert open
  • Start connection process for EV3
  • Click the "reconnect" button on the microbit disconnect alert
  • Now you're in a weird state, and the "connect" button for the EV3 will not work, and the modal appears to hang.

Operating System and Browser

Mac OS 10.13.6 Chrome 69 Scratch Link 1.1.9

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions