We're calling on all EU-based Mozillians with iOS or iPadOS devices to help us monitor Apple’s new browser choice screens. Join the effort to hold Big Tech to account!

Овај сајт ће имати ограничену функционалност док га будемо ажурирали у циљу побољшања вашег искуства. Ако неки чланак не реши ваш проблем и желите да поставите питање, на располагању ће вам бити наше заједнице подршке @FirefoxSupport на Twitter-у и /r/firefox на Reddit-у.

Претражи подршку

Избегните преваре подршке. Никада од вас нећемо тражити да зовете или шаљете поруке на број или да делите личне податке. Пријавите сумњиве радње преко „Пријавите злоупотребу” опције.

Сазнај више

Scrollbars in alert dialog box

more options

I have following HTML code which creates a dialog box when clicking the button.

On first click there is a horizontal scrollbar, however text is still readable, however if you click the button second time, the text is hidden under scrollbar.

How do you fix this?


<script type="text/javascript"> function clicker() { alert('SomeLongMessageWithoutSpacesInIt_SomeLongMessageWithoutSpacesInItSomeLongMessageWithoutSpacesInIt_SomeLongMessageWithoutSpacesInIt\n' + 'SomeLongMessageWithoutSpacesInIt_SomeLongMessageWithoutSpacesInItSomeLongMessageWithoutSpacesInIt_SomeLongMessageWithoutSpacesInIt\n' ) } </script> <input type="button" onclick="clicker()" value="click">

I have following HTML code which creates a dialog box when clicking the button. On first click there is a horizontal scrollbar, however text is still readable, however if you click the button second time, the text is hidden under scrollbar. How do you fix this? <html> <body> <script type="text/javascript"> function clicker() { alert('SomeLongMessageWithoutSpacesInIt_SomeLongMessageWithoutSpacesInItSomeLongMessageWithoutSpacesInIt_SomeLongMessageWithoutSpacesInIt\n' + 'SomeLongMessageWithoutSpacesInIt_SomeLongMessageWithoutSpacesInItSomeLongMessageWithoutSpacesInIt_SomeLongMessageWithoutSpacesInIt\n' ) } </script> <input type="button" onclick="clicker()" value="click" /> </body> </html>
Приложени снимци екрана

Измењено од стране bobsort

Сви одговори (1)

more options

Oh, is that because of the checkbox Firefox adds allowing you to stop the site from showing repetitive alert dialogs? I don't know of a workaround for that, other than having more time in between dialogs so the checkbox doesn't appear.

I looked into the checkbox a long time ago and don't know whether it works the same way it did back then: http://forums.mozillazine.org/viewtopic.php?f=25&t=2172671 (different forum)