Closed Bug 390186 Opened 17 years ago Closed 6 years ago

Make showModalDialog throw in situations other than when the window is blocked (e.g. security errors)

Categories

(Core :: DOM: Core & HTML, defect, P5)

defect

Tracking

()

RESOLVED WONTFIX

People

(Reporter: Waldo, Assigned: Waldo)

References

Details

(Whiteboard: [wanted?])

Bug 389988 made showModalDialog return null in any case where opening the window failed: blocked by popup blocker, security errors, OOM, etc.  This seems like a good idea for m7 so that content authors can get used to null being returned if the window open is blocked, just as occurs with window.open and the popup blocker.

However, going forward bz thinks it makes sense to make showModalDialog throw in some cases -- security errors certainly, OOM probably, and maybe other things.  (bz, please do correct this list if I didn't understand you correctly.)  We should determine the exact set of situations where we want showModalDialog to throw, and we should make it do so in those cases.
I think showModalDialog should throw exactly when window.open throws, basically.  I still think passing in true for the js fixups arg should be considered as the simplest way to accomplish this.
Flags: blocking1.9?
We should make Firefox behave like IE does here.
Flags: blocking1.9? → blocking1.9+
bz, would passing PR_TRUE there just fix this? Jeff, you wanna try and write up a patch?
Priority: -- → P3
> bz, would passing PR_TRUE there just fix this? 

I don't know.  What does IE do?  See comment 2.

Passing PR_TRUE would make it behave like window.open, yes.
I believe I looked into this several weeks ago and found out that was the right fix, but I don't really trust my memory right now, so I need to double-check that before finishing this up.
Flags: wanted-next+
Flags: tracking1.9+
Flags: blocking1.9-
Is this behavior still desired?
Whiteboard: [wanted?]
Target Milestone: mozilla1.9alpha8 → ---
Version: unspecified → Trunk
Component: DOM: Mozilla Extensions → DOM
Bulk priority change, per :mdaly
Priority: P3 → P5
We removed showModalDialog.
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → WONTFIX
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.