multiple window.alert only displayed once



Firefox OS
Gaia::System::Window Mgmt
5 years ago
4 years ago


(Reporter: kanru, Unassigned)



Gonk (Firefox OS)

Firefox Tracking Flags




(1 attachment)



5 years ago
In bug 829093 we called window.alert twice but only one of them is displayed.
(In reply to Kan-Ru Chen [:kanru] from comment #0)
> In bug 829093 we called window.alert twice but only one of them is displayed.

I know I ran into this issue as well, but I recall this happening with more than just alert. What about other prompts?
Unclear why this should block -- can you provide more info about concrete user impact?
Flags: needinfo?(kchen)
I'm not able to reproduce it, do you have an STR?

I tested it by patching dialer and opening it:
diff --git a/apps/communications/dialer/js/dialer.js b/apps/communications/dialer/js/dialer.js
index e897468..5d52eb6 100644
--- a/apps/communications/dialer/js/dialer.js
+++ b/apps/communications/dialer/js/dialer.js
@@ -1,5 +1,10 @@
 'use strict';
+setTimeout(function () {
+  alert('First');
+  alert('Second');
 var CallHandler = (function callHandler() {
   var callScreenWindow = null;
   var callScreenWindowLoaded = false;

With gaia: e213bb2465d34639f1e1f45f2000dbf2d4b10345

Comment 4

5 years ago
Created attachment 700947 [details] [diff] [review]
Alert repro

Apply this patch and follow the STR:

 1. Open settings -> Bluetooth
 2. Pair with a device
 3. Deny it from the other device
 4. Wait

You will found two log message "==== errorMessage ..." in logcat but only one alert window is ever showed.

One of them is from a DOMRequest onerror callback and the other one is from a system message handler callback.

I cannot reproduce this by using setTimeout nor addEventListener on visibilitychange either.

bb? because of potential message lose.
Flags: needinfo?(kchen)

request approval-gaia-master if this needs to be in v1
blocking-basecamp: ? → -
Keywords: dev-doc-needed


4 years ago
Component: Gaia::System → Gaia::System::Window Mgmt
You need to log in before you can comment on or make changes to this bug.