Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
In running live reload I've ran into multiple issues with Chrome crashing should I have the inspector open and after a while of just dealing with it I found that there's a relatively simple solution for it all. I found this solution at #2148717: Chrome (Chromium) crashes when using livereload and the element inspector which changes the css from being imported to being linked. This helps Chrome deal with them better. Offering up a patch that when the live-reload is turned on it changes this over to allow for compatibility.
Hope this helps others!
Comment | File | Size | Author |
---|---|---|---|
#7 | livereload-2158823-7.patch | 638 bytes | Cellar Door |
Comments
Comment #1
Cellar Door CreditAttribution: Cellar Door commentedAttaching the patch
Comment #2
Cellar Door CreditAttribution: Cellar Door commentedlate in the day and after re-reading I realized I had import and link swapped in my description. It changes everything to being imported rather than linked so it handles better.
Comment #3
Cellar Door CreditAttribution: Cellar Door commentedSheesh - I've got 3 comments on my own issue! Long day brain tired and I realized I was right the first time. Imports become links which allow Chrome to work with them instead of crashing. This is what the live reload module does just no need for the module with what we're doing. K - I'm done before I have to post another comment on my own issue :)
Comment #4
C13L0 CreditAttribution: C13L0 commentedThanks for this patch!
Comment #5
fubhy CreditAttribution: fubhy commentedEmpty whitespace on line 284.
Please add a whitespace after the //.
"force" not "orce" :)
In Drupal we have a whitespace between 'if' and the brackets.
The indentation looks weird there. Might be missing a closing curly bracket before this code block?
Comment #6
fubhy CreditAttribution: fubhy commentedYep, definitely wrong indentation / incorrect number of curly brackets there. Can you provide a fixed patch? Thanks!
Comment #7
Cellar Door CreditAttribution: Cellar Door commentedComment #8
basvredelingYou can also use https://drupal.org/project/link_css module to work around the crashes.
Comment #9
fubhy CreditAttribution: fubhy commentedYeah but I hate having to temporarly enable module for development purposes (other than "devel").
Thanks for the re-roll Chris. Committed.
Comment #10
basvredelingGlad, this has been committed. I wholly agree it's undesirable to use link_css as a workaround. Just wanted to document this for other developers.