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

RoR 7 : action_text toolbar and text not displayed - promise error in console.log #1182

Open
phytodia opened this issue Sep 2, 2024 · 3 comments

Comments

@phytodia
Copy link

phytodia commented Sep 2, 2024

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
@jhysek
Copy link

jhysek commented Sep 5, 2024

Same issue here. I've created a minimal example https://github.com/jhysek/trix-error-example if someone needs to reproduce the issue.

@thomas6791
Copy link

The problem comes probably from importmap.
It works when i use javascript include_tag 'trix'

@jslipak
Copy link

jslipak commented Oct 12, 2024

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/[email protected]/dist/trix.css">
    <script type="text/javascript" src="https://unpkg.com/[email protected]/dist/trix.umd.min.js"></script>
  </head>

Best regards Jonathan.

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

4 participants