Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ace.d.ts: Autocomplete not working because of missing type declaration of TextInput.setAriaOptions #5049

Closed
MGJamJam opened this issue Feb 2, 2023 · 2 comments

Comments

@MGJamJam
Copy link

MGJamJam commented Feb 2, 2023

Describe the bug

For ace-builds version >= 1.14.0:
In #5008 a new function setAriaOptions was added to TextInput, but not added to the Ace.d.ts file. When using Ace Editors autocomplete with Typescript, a TypeError is thrown because autocomplete calls setAriaOptions, but this function it is not defined in the Ace.d.ts file.

Expected Behavior

Autocomplete working normally.

Current Behavior

TypeError is thrown. Autocomplete stops working. No Popup is shown. The first entered key gets duplicated when typing in Editor.

Screenshot 2023-01-30 at 07 53 15

Reproduction Steps

Use Ace-Editor with Typescript and ace-builds >= 1.14.0. Set options to enable autocomplete
enableBasicAutocompletion: true, enableLiveAutocompletion: true,
and type into the editor.

Possible Solution

Add setAriaOptions() to Ace.d.ts:

export interface TextInput {
    resetSelection(): void;
    setAriaOption(activeDescendant: string, role: string): void;
  }

Additional Information/Context

No response

Ace Version / Browser / OS / Keyboard layout

Ace Version >= 1.14.0

@Sid-80
Copy link

Sid-80 commented Feb 11, 2023

#5057 will you please check it.

@nightwing
Copy link
Member

looks like this issue is caused by loading ace.js and ext-language_tools.js from different versions of ace, because https://github.com/ajaxorg/ace-builds/blob/v1.14.0/src-noconflict/ace.js#L4022 does not match with what is shown in the stacktrace

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants