Skip to content

Stop the Port field from snapping back to 3306 while typing #813

Closed

Description

@EVWorth

Severity: P2

What happens

  1. On ?mock, open + → "New Connection…".
  2. Click Port, select all, press Backspace. The field becomes "3306" again immediately.
  3. Type 3307. The field now reads 33063307.
  4. Nothing checks the range. Save is enabled, and Test Connection on the mock reports success for port 33063307.

Cause

  • src/components/connection/tabs/GeneralTab.tsx:53: parseInt(v) || 3306 replaces an empty value on every keystroke.
  • The same pattern is in src/components/connection/tabs/AdvancedTab.tsx:37 (connect timeout, || 10) and :44 (query timeout).

Fix

Keep the raw string in local field state and parse on blur or save. Validate 1–65535 (and positive timeouts), show an inline error, and disable Save and Test while a field is invalid.

Part of #783.

Activity

  1. added
    bug
    on Oct 21, 2026
  2. added a commit that references this issue on Oct 23, 2026
    be79bfe
  3. added a commit that references this issue on Oct 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions