Eric Stephens


370 Experience
3 Lessons Completed
0 Questions Solved


Hi Chris,

Can you take another look at this?

Thanks Chris,

I confirmed via console logs that when the page first loads:

  • The stimulus controller connects
  • The google maps API is initialized: initMap() is called without errors

When I click the button to load the modal, the modal loads but when I start typing in the field that should have google places autocomplete, nothing happens and there are no console errors.

Is there any additional logging you think I should add?

I'm wondering if something in the modal stimulus controller ( is interfering with or blocking something in the google places stimulus controller.

I'm using Jumpstart Pro, and I set up google maps place autocomplete using this lesson:
Google Maps and Google Places Autocomplete API with Rails, Turbolinks, and Stimulus.js

It works as expected when the form is inline on a page (e.g. /new), however, when I include the form in a tailwindcss-stimulus-components modal, the autocomplete isn't active and I don't see any errors in the console.

How can I make sure the google maps place autocomplete stimulus controller is active/enabled in a tailwindcss-stimulus-components modal?


logo Created with Sketch.

Screencast tutorials to help you learn Ruby on Rails, Javascript, Hotwire, Turbo, Stimulus.js, PostgreSQL, MySQL, Ubuntu, and more. Icons by Icons8

© 2022 GoRails, LLC. All rights reserved.