Closed Bug 487250 Opened 15 years ago Closed 15 years ago

When textbox content is generated by a specific xml template, the content disappears on focus

Categories

(Toolkit :: UI Widgets, defect)

1.9.0 Branch
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla1.9.2a1

People

(Reporter: bugzilla, Assigned: dao)

References

Details

(Keywords: regression)

Attachments

(2 files)

User-Agent:       Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.0.8) Gecko/2009032608 Firefox/3.0.8
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.3) Gecko/2008092521

When an xml template variable is created using text(), and this variable is used to assign a value to a textbox, the textbox loses its content when it is clicked.  The text is also grayed out.  Upon focus, the textbox goes blank.

Reproducible: Always

Steps to Reproduce:
1.  Create XML template as outlines above
2.  Observe the color of the text in the textboxes
3.  Click in a textbox
Actual Results:  
The textbox content is gray, and when clicked it disappears

Expected Results:  
The textbox content should have been black, and when clicked it should have remained visible.
Enn noted that "looks like the empty attribute set by the template conflicts with the similarly named empty attribute from the textbox"

and pointed out a workaround - setting the template's flags attribute to "dont-test-empty"
We should change textbox's empty attribute to something else. It's only used internally and by themes so something similar could be used.
I would suggest moz-empty, which would reflect that it's used internally and be consistent with moz-collapsed. But I suppose you're against the hyphen here too?
isempty ?

What is moz-collapsed?
xul.css defines moz-collapsed as an alias for collapsed. It's used where collapsed isn't wanted because it would be persisted, or something like that...
Status: UNCONFIRMED → NEW
Ever confirmed: true
Assignee: nobody → dao
Status: NEW → ASSIGNED
Attachment #373737 - Flags: review?(enndeakin)
Comment on attachment 373737 [details] [diff] [review]
rename internal attribute to "isempty"

>--- a/browser/themes/pinstripe/browser/searchbar.css
>+++ b/browser/themes/pinstripe/browser/searchbar.css

>-#searchbar[empty="true"] .search-go-button {
>-  visibility: hidden;
>-}

This is a no-op. #searchbar isn't a textbox and never had the "empty" attribute.
Blocks: 406095
Keywords: regression
OS: Windows XP → All
Hardware: x86 → All
Version: unspecified → 1.9.0 Branch
Component: XUL → XUL Widgets
Product: Core → Toolkit
QA Contact: xptoolkit.widgets → xul.widgets
Attachment #373737 - Flags: review?(enndeakin) → review+
Keywords: checkin-needed
http://hg.mozilla.org/mozilla-central/rev/9583c67570f5
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9.2a1
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: