Bug #666
closedLong text in an alert box in the AOZ Viewer can overwrite the OK button, making it impossible to click the OK button or to close the AOZ Window. (related to bugs 662, 665)
0%
Description
Example:
{ alert('1 In the beginning was the Word, and the Word was with God, and the Word was God. 2 He was with God in the beginning. 3 Through him all things were made; without him nothing was made that has been made. 4 In him was life, and that life was the light of all mankind. 5 The light shines in the darkness, and the darkness has not overcome[a] it. 6 There was a man sent from God whose name was John. 7 He came as a witness to testify concerning that light, so that through him all might believe. 8 He himself was not the light; he came only as a witness to the light. 9 The true light that gives light to everyone was coming into the world. 10 He was in the world, and though the world was made through him, the world did not recognize him. 11 He came to that which was his own, but his own did not receive him. 12 Yet to all who did receive him, to those who believed in his name, he gave the right to become children of God— 13 children born not of natural descent, nor of human decision or a husband’s will, but born of God. 14 The Word became flesh and made his dwelling among us. We have seen his glory, the glory of the one and only Son, who came from the Father, full of grace and truth.') }
The above code will cause AOZ to freeze when in the AOZ Viewer.
It works fine running in a web browser.
Related to bug#665
Files
Updated by Brian Flanagan almost 4 years ago
- Subject changed from Long text in alert box locks up the AOZ Viewer. to Long text in an alert box in the AOZ Viewer can overwrite the OK button, making it impossible to click the OK button or to close the AOZ Window.
Found that the long text didn't actually lock up AOZ, but rather made the OK button inaccessible.
I changed the Bug subject accordingly.
Updated by Brian Flanagan almost 4 years ago
Making the box modal, and allowing Enter to accept the default button would correct this.
See also Bug# 665.
Updated by Brian Flanagan almost 4 years ago
- Priority changed from Normal to High
Updated by Brian Flanagan almost 4 years ago
- File Only_Box_Shown.png Only_Box_Shown.png added
- File Hit_Reload_Button.png Hit_Reload_Button.png added
- File Alert1.png Alert1.png added
- File Alert2.png Alert2.png added
- File Alert3.png Alert3.png added
- File Alert4.png Alert4.png added
- Subject changed from Long text in an alert box in the AOZ Viewer can overwrite the OK button, making it impossible to click the OK button or to close the AOZ Window. to Long text in an alert box in the AOZ Viewer can overwrite the OK button, making it impossible to click the OK button or to close the AOZ Window. (related to bugs 662, 665)
- Assignee set to Baptiste Bideaux
- Affected version changed from 1.0.0 (B3) to 1.0.0 (B4)
Re-tested in 1.0.0 (B4). Problem still exists whenever a JavaScript alert box appears in the AOZ Viewer.
When running in the web browser, these issues go away.
NOTE: I coded an example using inline JavaScript in AOZ, but these alerts could also be generated by the AOZ IDE.
NOTE: I modified the test code, and organized it to clarify the problems.
It should display 4 alert boxes sequentially:
{ alert('test'); }
{
msg = "1 In the beginning was the Word, and the Word was with God, and the Word was God. ";
msg += "2 He was with God in the beginning. ";
alert(msg);
}
{
msg += "3 Through him all things were made; without him nothing was made that has been made. ";
msg += "4 In him was life, and that life was the light of all mankind.";
msg += "5 The light shines in the darkness, and the darkness has not overcome[a] it.";
alert(msg);
}
{
msg += "6 There was a man sent from God whose name was John.";
msg += "7 He came as a witness to testify concerning that light, so that through him all might believe.";
alert(msg);
}
Using this test when running in AOZ, (and using the custom retro-style alert boxes), I only see the last alert box (where the OK button is covered).
Unfortunately, since keyboard control has not been implemented, the the only way out of this, is to close and restart AOZ entirely.
I can, however, click the Direct Mode (Wizard Hat) button, and then click the Reload button to restart the program.
Since the retro-style box is still open, this enables the NORAML alerts to be displayed.
NOTE: The NORMAL alert boxes work properly (except that they are displayed at the top of the screen instead of the center of the AOZ Viewer window).
The other problems disappear:
1. The box is modal as it should be, so processing stops until the box is closed, or the OK button is clicked.
2. Keyboard control is functioning properly. (Enter is accepted, but since the box isn't modal, it loses focus, and the AOZ viewer closes instead.)
3. The box resizes to accommodate a larger amount of text as required. (In some browsers this would scroll vs. resize.)
4. The box wraps text properly as required. (With the retro boxes, long text can overflow both horizontally and vertically.
(See snapshots for more detail. See also Bugs #662, #665)
My recommendation: Since the new retro-style alert boxes aren't working properly anyway, rather than spending the time to fix them, just disable them, and allow the normal dialogs to be used, so we can devote that development time to more important things. (After all, weren't we trying to get away from the retro-style anyway?)
See also Bug #665, Bug #662 (JavaScript alert boxes don't work properly when in the AOZ Viewer.)
Updated by Brian Flanagan almost 4 years ago
- Status changed from New to Resolved
Re-tested in 1.0.0 (B5). WORKING! :-)
Updated by Brian Flanagan almost 4 years ago
- Status changed from Resolved to Closed