10000 v4: ActiveAdmin 4.0.0.beta15 not working on Firefox 138.0.1 due to import map issues · Issue #8723 · activeadmin/activeadmin · GitHub
[go: up one dir, main page]

Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

v4: ActiveAdmin 4.0.0.beta15 not working on Firefox 138.0.1 due to import map issues #8723

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

Closed
durcak opened this issue May 13, 2025 · 0 comments

Comments

@durcak
Copy link
durcak commented May 13, 2025

🐞 ActiveAdmin 4.0.0.beta15 not working on Firefox 138.0.1 due to import map issues


✅ Expected behavior

Basic UI interactions in ActiveAdmin should work in all modern browsers, including Firefox. Specifically:

  • Clicking “Add new” in has_many nested forms should dynamically add a new input block.
  • Clicking the delete link in index tables (e.g. to destroy a resource) should trigger the delete confirmation and perform the request.

These interactions should work without JavaScript errors in the browser console.


❌ Actual behavior

On Firefox 138.0.1, the following interactions do not work:

  • The "Add new" link in has_many fields does nothing.
  • The delete link in resource index tables does not trigger any action or confirmation.

The browser console reports:

Import maps are not allowed after a module load or preload has started. Uncaught TypeError: The specifier “active_admin” was a bare specifier, but was not remapped to anything. Relative module specifiers must start with “./“, “../” or “/”.

This makes ActiveAdmin unusable in Firefox out of the box when both Vite and Importmap are present.


🧪 How to reproduce

  1. Use activeadmin (4.0.0.beta15) in a Rails app with importmap-rails and vite_rails.
  2. In your app/views/active_admin/_html_head.html.erb, include the following:
<meta name="viewport" content="width=device-width,initial-scale=1">
<%= csrf_meta_tags %>
<%= csp_meta_tag %>
<% # On page load or when changing themes, best to add inline in `head` to avoid FOUC %>
<%= javascript_tag nonce: true do %>
  if (localStorage.theme === 'dark' || (!('theme' in localStorage) && window.matchMedia('(prefers-color-scheme: dark)').matches)) {
    document.documentElement.classList.add('dark')
  } else {
    document.documentElement.classList.remove('dark')
  }
<% end %>

<%= javascript_importmap_tags "active_admin", importmap: ActiveAdmin.importmap %>
<%= vite_typescript_tag 'active_admin' %>
  1. Open any ActiveAdmin form with has_many fields in Firefox 138.0.1.
  2. Click “Add new” or the delete link.
  3. Observe that nothing happens.
  4. Check the browser console for the above-mentioned error.

💻 System configuration
• activeadmin (4.0.0.beta15)
• Firefox version: 138.0.1
• Using both importmap-rails and vite_rails
• Rails 8.0.2

@activeadmin activeadmin locked and limited conversation to collaborators May 13, 2025
@javierjulio javierjulio converted this issue into discussion #8724 May 13, 2025

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant
0