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

Searchbox broken in example when using ace-builds@1.20.0 and > #1829

Open
FirstWhack opened this issue May 30, 2023 · 2 comments
Open

Searchbox broken in example when using ace-builds@1.20.0 and > #1829

FirstWhack opened this issue May 30, 2023 · 2 comments

Comments

@FirstWhack
Copy link

FirstWhack commented May 30, 2023

Problem

When using ace-builds 1.20 and above with latest version of react-ace the searchbox extension does not work. Error with unminified says nls is not defined.

Cause: ajaxorg/ace#5153
This contribution to Ace introduced a dependency on a new method nls to provide translations however the method is not always present and no checks are done to ensure it is. I am unable to locate any related documentation to clarify further.

Sample code to reproduce your issue

  • Run example with ace-builds@1.20.0 or greater
  • Ctrl+F/Cmd+F to search
  • Observe errors thrown in console

References

ajaxorg/ace#5153

Progress on: #

@zerocewl
Copy link

zerocewl commented Jun 8, 2023

Same issue here: ace-builds@1.19.0 is working fine, but 1.20.0 throws an error in the console:

ext-searchbox.js?5445:1 Uncaught TypeError: f is not a function
    at new e (ext-searchbox.js?5445:1:4514)
    at t.Search (ext-searchbox.js?5445:1:12802)
    at eval (ace.js?00a6:11045:67)
    at exports.loadModule (ace.js?00a6:1154:1)
    at Object.exec (ace.js?00a6:11045:1)
    at eval (ace.js?00a6:10797:1)
    at EventEmitter._emit.EventEmitter._dispatchEvent (ace.js?00a6:855:1)
    at CommandManager.exec (ace.js?00a6:10822:1)
    at KeyBinding.$callKeyboardHandlers (ace.js?00a6:4018:1)
    at KeyBinding.onCommandKey (ace.js?00a6:4037:1)

image

@zerocewl
Copy link

zerocewl commented Feb 1, 2024

Should be fixed according to ajaxorg/ace#5303. The search function works in the suggested ace kitchen-sink too.

Take care of removing all old ace-builds versions from the lock file e.g. removing and readding the related (react) ace packages.

Tested version which works for me: react-ace@1.10.0 and ace-builds@1.32.5

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

No branches or pull requests

2 participants