Project

General

Profile

Bug #666

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)

Added by Brian Flanagan about 3 years ago. Updated about 3 years ago.

Status:
Closed
Priority:
High
Target version:
-
Start date:
02/16/2021
Due date:
% Done:

0%

Estimated time:
1:00 h
Affected version:

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

Only_Box_Shown.png (97.7 KB) Only_Box_Shown.png Only alert shown when in AOZ Viewer. MANY problems! Brian Flanagan, 03/09/2021 12:17 PM
Hit_Reload_Button.png (106 KB) Hit_Reload_Button.png Hit Reload in Direct Mode to disable custom dialog. Brian Flanagan, 03/09/2021 12:17 PM
Alert2.png (107 KB) Alert2.png Second *normal* alert box. Brian Flanagan, 03/09/2021 12:17 PM
Alert1.png (191 KB) Alert1.png First *normal* alert box. Brian Flanagan, 03/09/2021 12:17 PM
Alert3.png (154 KB) Alert3.png Third *normal* alert box. Brian Flanagan, 03/09/2021 12:17 PM
Alert4.png (192 KB) Alert4.png Last *normal* alert box. Brian Flanagan, 03/09/2021 12:17 PM
#1

Updated by Brian Flanagan about 3 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.

#2

Updated by Brian Flanagan about 3 years ago

Making the box modal, and allowing Enter to accept the default button would correct this.
See also Bug# 665.

#3

Updated by Brian Flanagan about 3 years ago

  • Priority changed from Normal to High
#4

Updated by Brian Flanagan about 3 years ago

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.)

#5

Updated by Brian Flanagan about 3 years ago

  • Status changed from New to Resolved

Re-tested in 1.0.0 (B5). WORKING! :-)

#6

Updated by Brian Flanagan about 3 years ago

  • Status changed from Resolved to Closed

Closing this ticket. Text overflow on the boxes was fixed, but there are still issues with NOT being modal.
See tickets #662 and #667.

Also available in: Atom PDF