Home > Mobile >  Why my web browser crashes on Android phone when I have a lot of <span> elements under a singl
Why my web browser crashes on Android phone when I have a lot of <span> elements under a singl

Time:07-15

I've built a page with a paragraph split into multiple spans (in the thousands).

In some Android phones (Android 12, Chrome browser), when I open the web page, the browser crashes immediately. I can't find any reference to this problem in the entire web.

Any help?

CodePudding user response:

We solved this issue by converting the inline elements (<span>) into divs with display: inline-block (and replacing the spaces with &nbsp;).

For some reason, the browser in Android can't handle so many inline elements under a single parent

  • Related