Closed
Bug 1273997
Opened 9 years ago
Closed 6 years ago
alert, prompt, confirm don't work inside the viewport
Categories
(DevTools :: Responsive Design Mode, defect, P3)
DevTools
Responsive Design Mode
Tracking
(firefox66 verified)
VERIFIED
FIXED
Firefox 66
Tracking | Status | |
---|---|---|
firefox66 | --- | verified |
People
(Reporter: jryans, Assigned: pbro)
References
Details
(Whiteboard: [multiviewport][reserve-rdm][dt-q])
User Story
`window.alert()` fails inside the viewport, nothing happens: - data:text/html,<script>onclick=function(){alert('ok')}</script> I think it relates to mozbrowsershowmodalprompt `prompt` and `confirm` have similar issues.
Attachments
(1 file)
(deleted),
text/x-phabricator-request
|
Details |
Comment hidden (obsolete) |
Reporter | ||
Comment 1•9 years ago
|
||
(Copied from :ochameau's review of bug 1240913.)
Updated•9 years ago
|
Flags: qe-verify?
Reporter | ||
Updated•8 years ago
|
Flags: qe-verify? → qe-verify+
Updated•8 years ago
|
QA Contact: mihai.boldan
Comment 2•8 years ago
|
||
Just a remark regarding this issue: once you opened the RDM once in a tab's lifetime, window.alert()/window.open() won't work anymore, even if you close the RDM, reload the page, or change the URL.
Updated•8 years ago
|
Priority: P3 → P2
Reporter | ||
Comment 3•8 years ago
|
||
I've started to look at this one locally, so I'll grab it for now.
Assignee: nobody → jryans
Status: NEW → ASSIGNED
Updated•8 years ago
|
Iteration: --- → 51.2 - Aug 29
Priority: P2 → P1
Updated•8 years ago
|
Iteration: 51.2 - Aug 29 → 51.3 - Sep 12
Reporter | ||
Updated•8 years ago
|
Reporter | ||
Comment 4•8 years ago
|
||
I think part Benoit mentions in comment 2 is the more serious problem, since we're messing up the tab even after RDM is closed. I'll break that out to a separate bug. (It appears only the window.alert is impacted this way. window.open does work once you closed RDM.)
I created bug 1300214 for that portion. Furthermore, I think that's the only piece we really need before enabling in Nightly, so I'll move this back to reserve.
Assignee: jryans → nobody
Status: ASSIGNED → NEW
Priority: P1 → P3
Updated•8 years ago
|
Iteration: 51.3 - Sep 12 → ---
Reporter | ||
Comment 5•8 years ago
|
||
I am working on the window.open() portion in bug 1310851.
Summary: window.open, alert don't work inside the viewport → window.alert doesn't work inside the viewport
Reporter | ||
Updated•8 years ago
|
User Story: (updated)
Comment 7•8 years ago
|
||
Also affects window.prompt, but you probably already knew that.
Comment 10•7 years ago
|
||
.. and confirm() too (ran into this on a form confirming a db modification while trying to test throttling - apparently bug #1349559 will let me avoid this problem)
Comment 11•7 years ago
|
||
I just ran across the issue with alert not working in responsive design mode. It seems that this is still an open bug. Or is it a settings issue? Please advise.
Reporter | ||
Updated•7 years ago
|
User Story: (updated)
Summary: window.alert doesn't work inside the viewport → alert, prompt, confirm don't work inside the viewport
Comment 13•7 years ago
|
||
Still an issue in 59.0.3.
Updated•6 years ago
|
Product: Firefox → DevTools
Comment 14•6 years ago
|
||
I'm at 61.0.1 and the problem still there.
Comment 15•6 years ago
|
||
window.open() won't return window reference as well
Comment 16•6 years ago
|
||
I think this should have a higher priority since it seems it is affecting a lot of developers using the RDM.
Updated•6 years ago
|
Whiteboard: [multiviewport][reserve-rdm] → [multiviewport][reserve-rdm][dt-q]
Comment 20•6 years ago
|
||
I would like to add that this should be considered a higher priority.
I just spent over an hour debugging code, resetting browser settings to default, disabling plug-ins, and ask co-workers to test a page in their browser. I was using RDM to simulate the screen of a coworker who had a larger display than me, and suddenly our save confirmation prompts stopped working (which made it so modal layers couldn't be closed at all).
I had figured that a recent Firefox update decided to disable them or something (IE disabled prompt() a few years ago) and I was > < this close to creating an emergency porting for all my code.
I had completely forgotten that I was in RDM mode and only when a co-worker mentioned it did I think to close out RDM - and sure enough the code works again.
Assignee | ||
Comment 21•6 years ago
|
||
With the way RDM works today, this isn't a trivial fix.
I've been looking at the code for this and related comments on this bug, and I do think that support alert() should be quite easy.
Supporting prompt and confirm though seem a lot harder, but it's perhaps because I don't know where to look yet.
It'd be great if the mozbrowser iframe we use could just be allowed to open these prompt dialogs by default. And it's probably the right fix.
In the meantime, listening to mozbrowsershowmodalprompt events will make it possible to relay alerts through the outer browser, but sending back the return value of confirm/prompt calls seems trickier.
If we can't do them quickly, we should at least make sure users understand that they're not supported. Many people have lost hours just wondering why their code wasn't working, when really RDM was just silently swallowing the alert/confirm/prompt dialogs.
So I would suggest implementing a fix for alerts, and warning users for prompt/confirm for the time being.
And in the meantime, starting the investigation on the platform side, to allow mozbrowser iframes to do all 3 types of prompts.
Assignee | ||
Comment 22•6 years ago
|
||
Assignee | ||
Comment 23•6 years ago
|
||
Comment on attachment 9029624 [details]
Bug 1273997 - Minimap support for alerts in RDM by relaying alerts on outer browser
Hi Ryan, not sure how much time you have these days for Mozilla-stuff, but in case you have a few minutes to spare, what do you think of this (see comment 21 for the rationale behind this)?
Attachment #9029624 -
Flags: feedback?(jryans)
Comment 24•6 years ago
|
||
Thank you. I understand the fix may not be trivial, but at the very least a warning message in the console that messages are being suppressed due to RDM would be a huge time saver.
Assignee | ||
Comment 25•6 years ago
|
||
Comment on attachment 9029624 [details]
Bug 1273997 - Minimap support for alerts in RDM by relaying alerts on outer browser
Let me drop this attachment as it turned out to be much easier than I thought to support comfirm/prompt too, since we have all the APIs we need thanks to BrowserElementPromptService.
Thank you Ryan for your guidance on IRC yesterday.
Attachment #9029624 -
Attachment is obsolete: true
Attachment #9029624 -
Flags: feedback?(jryans)
Updated•6 years ago
|
Attachment #9029624 -
Attachment is obsolete: false
Reporter | ||
Comment 26•6 years ago
|
||
Seems like a reasonable approach to me. Sorry this area is so painful...
Assignee | ||
Updated•6 years ago
|
Assignee: nobody → pbrosset
Status: NEW → ASSIGNED
Comment 27•6 years ago
|
||
Pushed by pbrosset@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/95e9c87e234b
Minimap support for alerts in RDM by relaying alerts on outer browser r=ochameau,jryans
Comment 28•6 years ago
|
||
bugherder |
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
status-firefox66:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 66
Verified Fixed on latest Nightly 66.0a1 (2019-01-10) (64-bit) on Windows 10, Ubuntu 16.04 and Mac OS 10.13.
Status: RESOLVED → VERIFIED
Flags: qe-verify+
Updated•6 years ago
|
You need to log in
before you can comment on or make changes to this bug.