Closed Bug 994537 Opened 6 years ago Closed 6 years ago

Dupe alert between inline activity and its caller

Categories

(Firefox OS Graveyard :: Gaia::System::Window Mgmt, defect)

x86
macOS
defect
Not set

Tracking

(blocking-b2g:1.4+, b2g-v1.4 fixed, b2g-v2.0 fixed)

RESOLVED FIXED
1.4 S6 (25apr)
blocking-b2g 1.4+
Tracking Status
b2g-v1.4 --- fixed
b2g-v2.0 --- fixed

People

(Reporter: alive, Assigned: alive)

References

Details

(Whiteboard: [caf priority: p2][CR 664258])

Attachments

(1 file)

+++ This bug was initially created as a clone of Bug #825435 +++

While working on the video app's view activity handler, I ended up handling an error case with code like this:

  alert(error_message);
  activity.postResult({});

When I did this, the alert would appear over the activity, the user would dismiss the alert dialog and the activity would end, but then the alert would still be visible over top of the calling app, and the user would have to dismiss it again.

I'm guessing that there is some strange interaction in the system app between dismissing an alert and dismissing an inline activity that causes the alert to be confused.

The workaround I found was this:

  alert(error_msg);
  setTimeout(function() { activity.postResult({}); }, 50);

With that code, the user only had to dismiss the alert once.

I'm going to cc Vivien and Tim on this because I think they may be familiar with the appropriate parts of the system app. Do either of you think that this should be a blocker?
See https://bugzilla.mozilla.org/show_bug.cgi?id=825435#c5

Caused by bug 977934: we didn't call stopPropagation for all mozbrowser events in AppModalDialog.
To prevent this happens again, I think we need to do stopPropagation for all known mozbrowser events in appWindow event handler.
Have a patch, writing integration tests right now.
Stop any mozbrowser events to be propagated to parent window.
Attachment #8404532 - Flags: review?(timdream)
Attachment #8404532 - Flags: review?(timdream) → review+
Duplicate of this bug: 1006070
Duplicate of this bug: 1013166
Blocks: 984663
blocking-b2g: --- → 1.4+
Whiteboard: [CR 664258]
Whiteboard: [CR 664258] → [caf priority: p2][CR 664258]
You need to log in before you can comment on or make changes to this bug.