Closed Bug 800689 Opened 12 years ago Closed 12 years ago

[System] Support modal dialogs (alert/prompt/confirm) from inline activity frames

Categories

(Firefox OS Graveyard :: Gaia, defect, P2)

defect

Tracking

(blocking-basecamp:+, firefox18 fixed, firefox19 fixed)

RESOLVED FIXED
blocking-basecamp +
Tracking Status
firefox18 --- fixed
firefox19 --- fixed

People

(Reporter: timdream, Assigned: alive)

References

Details

(Whiteboard: QARegressExclude)

Attachments

(1 file)

The fix proposed in bug 796694 requires |alert()| to work from inline activity frames. modal_dialog.js should catch the events and show the alert.
Should be blocking coz it's blocking a blocking bug.
blocking-basecamp: --- → ?
I think we should optimistically block on this. If we start running low on time I think we should simply work around this in the pdf viewer instead.
blocking-basecamp: ? → +
Priority: -- → P2
Assignee: nobody → alive
Comment on attachment 671401 [details] [diff] [review]
support modal dialog in inline-activity frame

There are some potential issues here but I don't think it's a big deal.

>@@ -86,7 +89,8 @@ var ModalDialog = {
> 
>         // Show modal dialog only if
>         // the frame is currently displayed.
>-        if (origin == WindowManager.getDisplayedApp())
>+        if (origin == WindowManager.getDisplayedApp() ||
>+            frameType == 'inline-activity')
>           this.show(origin);
>         break;
> 

The "origin" (window_manager.js identifier, see bug 796629) of the inline activity frame will be same as the one for the main app frame. Relying that might mix up the dialogues a bit.

>@@ -112,6 +116,14 @@ var ModalDialog = {
>         this.show(evt.detail.origin);
>         break;
> 
>+      case 'home':
>+      case 'holdhome':
>+        // Inline activity, which origin is different from foreground app
>+        if (this.isVisible() && 
>+            this.currentOrigin != WindowManager.getDisplayedApp())
>+          this.cancelHandler();
>+        break;
>+

Don't like the special handling of the inline frame but it's not your fault. :-/

Thanks. Don't forget to paste the merging Github URL when landing the fix.
Attachment #671401 - Flags: review?(timdream+bugs) → review+
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Component: General → Gaia
Whiteboard: QARegressExclude
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: