Clicking the bar shows dialogs in the background, causing the homescreen to be unusable



Firefox OS
4 years ago
4 years ago


(Reporter: janjongboom, Assigned: janjongboom)


Firefox Tracking Flags

(Not tracked)



(1 attachment)

In Firefox Nightly with a DEBUG profile, click the bar.

Now there is mayhem as you can't use the homescreen anymore.
Created attachment 8370666 [details] [review]

So what happens on FF Nightly is that the templates for the dialogs get filled when you click bar. I don't really know why that happens. The problem is that all the styling for these elements are in CSS files that will be lazy loaded when needed, causing the elements to show up with their default styles, which is why they are visible. There is no JS logic behind it either (also lazy loaded) so you can't dismiss it.

This patch adds a default style of display: none to the dialogs in homescreen.css that will be overwritten when we load the dialog CSS on demand. Tested it on the device as well and the context menu's still work as expected.
Assignee: nobody → janjongboom
Attachment #8370666 - Flags: review?(21)
Attachment #8370666 - Flags: feedback?(kgrandon)
Comment on attachment 8370666 [details] [review]

Awesome, thanks for doing this!
Attachment #8370666 - Flags: feedback?(kgrandon) → feedback+
Honestly, it should not happen because both are elements that haven't imported yet. So this patch works perfectly but it could hide the root issue thought
Yeah, my assumption was that was trying to load some CSS but crashing/failing somewhere before it does.. It would probably be good to have an understanding of the root issue before landing.
Maybe Ran can have any idea
Ran, any thought? Thx mate
Flags: needinfo?(ran)
Amir, do you?
Flags: needinfo?(ran) → needinfo?(amirn)

Comment 8

4 years ago
Does not happen on device, I always assumed this is a Nightly issue.

Looks like lazy_loader.js behaves differently when DBEUG=1:

Flags: needinfo?(amirn) → needinfo?(kgrandon)
Yes, it behaves differently - but I don't think it should cause the issues shown. Instead of inlining elements, we just lazily load them.

It sounds like we need to just dig in to see exactly what's going on here.
Flags: needinfo?(kgrandon)
Well, anyway, we're having a bunch of div's that have a display: block state whereas they should not be visible at all in default state (regardless of whether there is content in them) so we could land this anyway.

Then we can take a look at the reason why we populate the divs when we focus on the bar.
Comment on attachment 8370666 [details] [review]

OK, delete dialog and context menu work fine, thanks
Attachment #8370666 - Flags: review?(crdlc) → review+
Thanks Christian,
Last Resolved: 4 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.