Closed Bug 516387 Opened 15 years ago Closed 15 years ago

nsPromptService dialogs should not have '&' shortcut in labels

Categories

(Firefox for Android Graveyard :: General, defect)

ARM
Maemo
defect
Not set
normal

Tracking

(Not tracked)

VERIFIED FIXED
fennec1.0b4

People

(Reporter: jmaher, Assigned: mfinkle)

References

Details

Attachments

(1 file, 1 obsolete file)

I get the unresponsive script warning on fan590.com on my n810 with swap enabled:)  This script has changed since the last time I saw it and there are some issues with it:
1) there is what appears to be a Yes/No slider like the preferences, but it is unclear, all the same color and says No
2) there is "&Don't ask me again".  Not sure what the & is about, I suspect it is for making the D a alt+ in windows.
bug 514208 will address the theme issues. I'll turn this bug into dealing with the &
Summary: unresponsive script warning has formatting and usability issues → nsPromptService dialogs should not have & shortcut in labels
tracking-fennec: --- → ?
Component: Linux/Maemo → General
QA Contact: maemo-linux → general
Attached patch patch (obsolete) — Splinter Review
This patch uses the code to strip & characters from any place that a users can pass a string for a label.
Assignee: nobody → mark.finkle
Attachment #400863 - Flags: review?(gavin.sharp)
Comment on attachment 400863 [details] [diff] [review]
patch

Fabrice - can you look this over too?
Attachment #400863 - Flags: review?(fabrice.desre)
Summary: nsPromptService dialogs should not have & shortcut in labels → nsPromptService dialogs should not have '&' shortcut in labels
Comment on attachment 400863 [details] [diff] [review]
patch

>diff --git a/chrome/content/prompt/promptPassword.xul b/chrome/content/prompt/promptPassword.xul  
>   <hbox id="prompt-password-checkbox-box" collapsed="true" align="center">
>     <checkbox class="toggle-dark" id="prompt-password-checkbox"/>
>-    <description id="prompt-password-checkbox-msg"/>
>+    <label id="prompt-password-checkbox-msg"/>
>   </hbox>
>   <hbox pack="center" id="prompt-password-button-box">

We should keep a <description> here since a <label> will not wrap if the text is too long and we probably don't want to crop it.

This means that :
- setLabelForNode() needs to check if aNode is a description to add a text child node.
- we also should make sure that other checkbox messages are descriptions, which is not the case currently.
Attachment #400863 - Flags: review?(fabrice.desre)
Attachment #400863 - Flags: review-
Attachment #400863 - Flags: review?(gavin.sharp)
Attached patch patch 2Splinter Review
This patch addresses Fabrice's comments. The <label>s have been changed to <description>s and setLabelForNode checks for <label>s and <description>s, handling each a little differently.

Screenshot of the fix:
http://people.mozilla.com/~mfinkle/fennec/screenshots/fennec-slowscript-fix.png
Attachment #400863 - Attachment is obsolete: true
Attachment #402266 - Flags: review?(gavin.sharp)
Attachment #402266 - Flags: review?(gavin.sharp) → review+
pushed:
https://hg.mozilla.org/mobile-browser/rev/aeb08b2119c8
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Target Milestone: --- → B4
verified FIXED with the security label on build:

Mozilla/5.0 (X11; U; Linux armv7l; en-US; rv:1.9.2b1pre) Gecko/20090923
Fennec/1.0b4pre
Status: RESOLVED → VERIFIED
tracking-fennec: ? → ---
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: