miguelgrinberg / turbo-flask

Integration of Hotwire's Turbo library with Flask.
MIT License
301 stars 35 forks source link

image refresh #32

Open julianblanco opened 2 years ago

julianblanco commented 2 years ago

Is it possible to make an image refresh using turbo-flask?

Not sure opening an issue is the most appropriate way to ask this so apologies in advance.

miguelgrinberg commented 2 years ago

You can replace any portion of the page. For example, you can replace an <img> tag with a different <img> tag.

julianblanco commented 2 years ago

Thank you! This is working (and i feel stupid) Also is normal that turbo.push(turbo.update( causes a total page refresh on some browsers (mac safari, iphone safari, iphone chrome) but not others (windows chrome, nix chrome, nix firefox)

miguelgrinberg commented 2 years ago

This is a question that you need to ask the people who make the turbo.js library, as it has nothing to do with my Flask integration. From your list of browsers that don't work I think the only one I ever tested was Mac Safari, and I don't recall seeing any problems with it.

julianblanco commented 2 years ago

Thanks for the quick response and great library!