-
Type:
Regression Bug
-
Status: Open
-
Priority:
Minor
-
Resolution: Unresolved
-
Affects Version/s: 3.0.x
-
Fix Version/s: None
-
Component/s: ACE Editor
-
Labels:None
An error is thrown when the the ACE Editor's aui-ace-editor module is used in a YUI sandbox after the initial page load.
Steps to reproduce:
- Copy the following html into a file:
<html> <head> <title>test</title> <script src="/Path/to/alloy-ui/build/aui/aui-min.js"></script> <link href="/Path/to/alloy-ui/build/aui-css/css/bootstrap.min.css" rel="stylesheet" /> </head> <body> <strong>Initially Rendered</strong><div id="initial"></div> <button id="button" onclick="YUI().use('aui-button', function(A) { new A.Button({ render: true, srcNode: '\x23button' });}); YUI().use('aui-ace-editor', function(A) { alert('dynamic'); });">button</button> <script type="text/javascript"> YUI().use('aui-ace-editor', function(A) { new A.AceEditor({ render: true, boundingBox: '\x23initial' }); }); </script> </body> </html>
- Fix the paths to the js and css to point to the latest AlloyUI 3 build.
- Open the file in a browser.
- Click the button.
If the bug still exists, an error will appear in the browser logs, and the dynamic alert will not appear.
In Firefox, the following error will appear:
TypeError: r.modules is undefined
In Chrome, the following error will appear:
Uncaught TypeError: Cannot read property 'ace/ace' of undefined
Note: In AlloyUI 2.0.0 and 3.0.1, this bug did not exist.
Note 2: Other modules that I've tested (such as aui-button in the example) work correctly with no errors when used after the initial page load.