Skip to content

editor: firefox compatible issue: autocomplete may corrupt the editor value #5858

@yurenchen000

Description

@yurenchen000

Describe the bug

Reopen Closed Tab, ace editor value may be corrution.
// on ubuntu, firefox

after little dig
I realize it's corrupted by textarea autocomplete of browser firefox.

Expected Behavior

the editor value shoud keep as orig

Current Behavior

editor value is corruption

Reproduction Steps

  1. open ace page use firefox,
    put custor at any line of ace editor
    for example: https://ace.c9.io/

  2. close the page

  3. restore the page, via ctrl+shift+t
    or tab context-menu Reopen Closed Tab

//screenshot of step 1
Image

//screenshot of step 3 (the first line is here)
Image

Possible Solution

a quick fix:

///=== fix: firefox textarea autocomplete issue 
editor_ta = editor.textInput.getElement()
editor_ta.setAttribute("autocomplete", "off");

Additional Information/Context

OS: ubuntu 22 (gnome 42)
Browser: fireforx 141

Ace Version / Browser / OS / Keyboard layout

ace 1.43.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions