0 votes

Javascript Alert does not display full text in

This seems to be a browser problem since in development environment the alert arrives complete, but when a test user looks at the alert, it does not display the full text.

The alert is a normal javascript alert, we are just using the bootstrap style libraries,

alert("Este es un Texto Largo y la ultima palabra desaparece");

Does anyone know why this might be happening ?


edit: this is happening to the user in all browsers, so it may be a problem with your specific pc ?

1voto

k3llydev Points 305

Unfortunately, with the information you provide, it is not possible to determine what is causing the problem. But what I can and will help you with is a recommendation:

Bootboxjs

It is simple to use, customizable and adaptable to any application you want to make. Besides you avoid that kind of compatibility problems between browsers.

I leave you the link to the official website so you can take a look at it.

http://bootboxjs.com/

Compatibility of alert() with different browsers

https://caniuse.com/#search=alert

1voto

Diego Avila Points 3436

Greetings I have generated 5 paragraphs, 557 words, 3789 bytes and have had no problems:

<script>
alert('Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer auctor ornare nunc. Duis eu posuere libero, eget auctor orci. Curabitur a risus vel leo elementum pellentesque. Pellentesque sollicitudin ut odio sed pulvinar. Praesent et lectus lacus. Proin pharetra tincidunt tortor, nec posuere velit. Proin molestie ipsum odio, eget eleifend tortor faucibus in. Proin tristique eu mi sit amet suscipit. Pellentesque quis aliquam nibh. Etiam mi ipsum, dictum eu varius ut, suscipit vitae est. Cras in eleifend ipsum, in blandit velit. Donec suscipit efficitur nisl, eget mattis augue viverra eu. Sed iaculis erat at finibus feugiat. Phasellus ullamcorper bibendum dui, a ultrices turpis dapibus quis.Vestibulum tempor ex fermentum augue commodo luctus. Cras consequat ullamcorper lectus, et faucibus magna sodales nec. Etiam mi nisi, vulputate vitae molestie et, facilisis eu dui. Etiam mattis pellentesque bibendum. Donec elementum tincidunt sem in congue. Integer ac mauris leo. Aenean viverra lacinia purus, eget elementum arcu aliquam eget. Fusce non nibh quis odio aliquet varius eu vel neque. Cras hendrerit at erat sit amet rhoncus. Aliquam eleifend libero ac facilisis eleifend. Mauris posuere eget sapien nec pretium. Suspendisse scelerisque, lorem ac condimentum placerat, sem arcu cursus diam, sed pharetra sapien ante eget arcu. Praesent faucibus arcu in consectetur pretium. Suspendisse a arcu a risus aliquet convallis quis id velit. Nulla eu diam laoreet, varius leo non, aliquam dolor. Donec ut facilisis dolor. Cras magna dolor, facilisis quis eleifend feugiat, aliquet sit amet odio. Morbi suscipit sem ut mauris ultrices vestibulum. Praesent lacus nisl, posuere vel ullamcorper efficitur, ullamcorper at purus. Nunc vel dolor volutpat urna bibendum sagittis at et nisl. In hac habitasse platea dictumst. Quisque a felis vitae erat porta mattis et ut nulla. Suspendisse tristique sit amet mauris ut semper. Phasellus iaculis posuere erat eget suscipit. Aenean non libero porta, commodo metus ac, efficitur orci. Suspendisse id tincidunt nibh, non finibus felis. Mauris at tempor nisl. Sed eu suscipit sem, nec fermentum enim. Sed fringilla felis at sodales sagittis. Curabitur eu mi et lorem congue ultricies. Maecenas tincidunt rutrum ex quis rutrum. Vivamus facilisis mi augue, vel iaculis sem rhoncus eu. Phasellus suscipit, nunc eu ultricies finibus, urna elit aliquet urna, nec fringilla risus leo eu ex. Nullam finibus sem fermentum odio lobortis dignissim. Donec porta, ligula non consectetur auctor, elit ipsum finibus est, a lacinia justo metus sit amet nunc. Quisque velit mi, dapibus vitae gravida sed, rutrum et magna. Praesent volutpat feugiat bibendum. Nam venenatis nibh non felis mollis viverra. Aliquam nisi odio, condimentum vitae nunc sed, maximus ultricies orci. ');
</script>

You should check your styles, updated browser versions, and lastly I recommend using :

SweetAlert

It will help you a lot in the alerts you have many styles for the same and is customizable!!!!!

HolaDevs.com

HolaDevs is an online community of programmers and software lovers.
You can check other people responses or create a new question if you don't find a solution

Powered by:

X