Unable to distinguish the close button when using prompt service confirmex

RESOLVED DUPLICATE of bug 345067

Status

()

Core
Embedding: APIs
RESOLVED DUPLICATE of bug 345067
12 years ago
12 years ago

People

(Reporter: mkaply, Unassigned)

Tracking

Trunk
x86
Windows XP
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

12 years ago
If you use prompt service confirmex to create a prompt like this:
    var promptService = Components.classes["@mozilla.org/embedcomp/prompt-service;1"].
                                   getService(Components.interfaces.nsIPromptService);
    var flags = (promptService.BUTTON_TITLE_OK * promptService.BUTTON_POS_0) +
                (promptService.BUTTON_TITLE_IS_STRING * promptService.BUTTON_POS_1) +
                (promptService.BUTTON_TITLE_IS_STRING * promptService.BUTTON_POS_2);
      var button = promptService.confirmEx(window, "Title", "text", flags, 
                   null, "Source", "Dump", null, { });
alert(button);

then there is no way to distinguish between clicking the close button and clicking button 1.

When the close button is clicked, I am told button 1 was clicked.

There should be a way to remap the close button to other than 1.
I assume you mean the window manager decoration when you say "close button"?
Status: NEW → RESOLVED
Last Resolved: 12 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 345067
You need to log in before you can comment on or make changes to this bug.