RoR 7 : action_text toolbar and text not displayed - promise error in console.log
phytodia opened this issue · 3 comments
Hi, since one week and maybe after switch from cloudinary to s3, my action_text toolbar is not displayed and my text is hidden or not clickable.
I have in console.log few errors like this :
Uncaught TypeError: Cannot read properties of undefined (reading 'Promise')
at trix-df2bf484e34719e3b4933ba6bc3139eb1e7ad4fbbedb13bbd04be4d80b42664a.js:6:3008
at trix-df2bf484e34719e3b4933ba6bc3139eb1e7ad4fbbedb13bbd04be4d80b42664a.js:6:3031
- Trix version:
- Browser name and version: All browsers (Chrome, safari, Firefox)
- Operating system: Ruby on Rails 7
Same issue here. I've created a minimal example https://github.com/jhysek/trix-error-example if someone needs to reproduce the issue.
The problem comes probably from importmap.
It works when i use javascript include_tag 'trix'
I encountered the same issue. As a temporary workaround, I added the following code to:
app/views/layouts/application.html.erb:
<head>
...
<!-- BUG: Trix problem Issue Open https://github.com/basecamp/trix/issues/1182 -->
<link rel="stylesheet" type="text/css" href="https://unpkg.com/trix@2.0.8/dist/trix.css">
<script type="text/javascript" src="https://unpkg.com/trix@2.0.8/dist/trix.umd.min.js"></script>
</head>
Best regards Jonathan.