Closed
Bug 53673
Opened 24 years ago
Closed 21 years ago
multiline textbox does not accept initial value
Categories
(Core :: XUL, defect, P4)
Tracking
()
RESOLVED
FIXED
mozilla1.6beta
People
(Reporter: arthur.barrett, Assigned: neil)
References
Details
(Keywords: polish)
Attachments
(9 files, 1 obsolete file)
1.43 KB,
text/xml
|
Details | |
1.59 KB,
text/xml
|
Details | |
1.09 KB,
text/xml
|
Details | |
1.05 KB,
text/xml
|
Details | |
522 bytes,
text/xul
|
Details | |
263 bytes,
application/vnd.mozilla.xul+xml
|
Details | |
907 bytes,
patch
|
benjamin
:
review+
jag+mozilla
:
superreview+
dbaron
:
approval1.6b+
|
Details | Diff | Splinter Review |
950 bytes,
patch
|
bryner
:
review+
|
Details | Diff | Splinter Review |
1.82 KB,
patch
|
janv
:
review+
hyatt
:
superreview+
|
Details | Diff | Splinter Review |
<textfield multiline="true" cols="80" rows="5" id="resstr" value="this initial
value does not appear (for me) but I dont know why"/>
says it all...
Comment 1•24 years ago
|
||
Could you attach a test case to the bug? Correcting component, -> HTML Form Controls
Assignee: trudelle → rods
Component: XP Toolkit/Widgets → HTML Form Controls
QA Contact: jrgm → ckritzer
Reporter | ||
Comment 2•24 years ago
|
||
Surely NOT HTML! XUL. Will attach a .XUL file to make it clear.
Component: HTML Form Controls → XP Toolkit/Widgets: XUL
Reporter | ||
Comment 3•24 years ago
|
||
Reporter | ||
Comment 4•24 years ago
|
||
<html:textarea> does not take a value="" attribute, so I thought it was
definite to XUL.
But yes, <html:textarea>blah</html:textarea> exhibits the same behaviour in a
XUL file.
started with mozilla -chome chrome://blah
will attach updated test set
Reporter | ||
Comment 5•24 years ago
|
||
Comment 6•24 years ago
|
||
Yeah, this works correctly for <textarea>foo</textarea> in HTML documents, but
not for <html:textarea>, or the <textarea> XBL binding (which is what
<textfield multiline="true"> actually maps to in xulBindings.xml).
It really needs to look at the child text nodes to initially set the .value
property, but updating the .value property seems to work correctly (not
sure how the binding really works myself).
-> Ben, the binding meister
Assignee: rods → ben
Status: UNCONFIRMED → NEW
Ever confirmed: true
Summary: multiline textfield does not accept value → multiline textfield does not accept initial value
Reporter | ||
Comment 7•24 years ago
|
||
So if I want to go bug hunting is this the place to start ?
http://lxr.mozilla.org/mozilla/source/xpfe/global/resources/content/xulBindings.
xml#357
Also I do not understand how
http://lxr.mozilla.org/mozilla/source/xpfe/global/resources/content/xulBindings.
xml#242 binds textarea to textfield multiline="true" since it is not inherited
and it is not an implemented property. Suppose I dont really have to
understand, but it'd be nice.
Reporter | ||
Comment 8•24 years ago
|
||
Reporter | ||
Comment 9•24 years ago
|
||
Comment 11•24 years ago
|
||
Sigh ... (ckritzer's been into the rum and egg-nog again).
Assignee: jrgm → ben
QA Contact: ckritzer → jrgm
Comment 12•24 years ago
|
||
Okay, not only am I an idiot, I'm an embarrassed idiot.
Sorry guys, I meant to change the QAContact, not Assigned field.
Comment 13•24 years ago
|
||
Looks like bug 42646. This belongs to hyatt really.
Comment 14•24 years ago
|
||
the <html:textarea> part of the last testcase works for me on bugzilla, but not
on a local file (wonder why, really)
the <textfield multiline="true"> part of the last testcase never works.
CC'ing jst and rods, because when I use setAttribute("value", ...) and
.value=..., it works just fine. So for some reason the setter fails when first
creating the textfield, but succeeds later on. Strange.
Comment 15•24 years ago
|
||
Reporter | ||
Comment 16•24 years ago
|
||
Is it possible to get this a target milestone of 9.x ?
This is an important bug for me since I am developing software which uses
Mozilla/XUL, I know it doesnt affect the API, but still....
Comment 17•24 years ago
|
||
Dunno if ben has even looked at this. Cc'ing hyatt, pinging ben.
/be
Comment 18•24 years ago
|
||
(This is now called a <textbox multiline="true", just to clarify).
You could have a look at the definition of the XBL for this widget, and
get it to properly support the 'value' attribute. But, as a workaround,
you can set the value, in an onload handler or otherwise (do you really
need to statically set the value in the initial xul file?).
Summary: multiline textfield does not accept initial value → multiline textbox does not accept initial value
Updated•23 years ago
|
Status: NEW → ASSIGNED
Priority: P3 → P4
Target Milestone: --- → mozilla1.0
Comment 20•23 years ago
|
||
Bugs targeted at mozilla1.0 without the mozilla1.0 keyword moved to mozilla1.0.1
(you can query for this string to delete spam or retrieve the list of bugs I've
moved)
Target Milestone: mozilla1.0 → mozilla1.0.1
Comment 21•23 years ago
|
||
Morrison -> i.e. if you want to set the value from an RDF DataSource. in this
case the value is set dinamically in the initial xul file, but not with
an onload handler.
Comment 22•23 years ago
|
||
*** Bug 122785 has been marked as a duplicate of this bug. ***
Comment 23•22 years ago
|
||
for someone who needs this feature.
You can solve this trouble temporally this way:
Create a xbl binding that extends from
chrome://global/content/bindings/textbox.xml#textarea;
Constructor of the binding must have this line:
this.value = this.getAttribute("value");
In addition you must define a css style for the binding in order to display it
like a xul textbox with a multiline attribute.
Assignee | ||
Comment 24•22 years ago
|
||
Assignee | ||
Comment 25•22 years ago
|
||
Two points:
1. <constructor action="..."> doesn't seem to work
2. this.boxObject.getProperty('value') doesn't seem to work
Assignee | ||
Updated•22 years ago
|
Attachment #107468 -
Flags: superreview?(jaggernaut)
Attachment #107468 -
Flags: review?(blaker)
Assignee | ||
Updated•22 years ago
|
Comment 26•22 years ago
|
||
<constructor action="..."/> not working may or may not be by design. Ask hyatt.
this.boxObject.getProperty("...") should work (if that property was previously set).
What the old code did (assuming action="..." worked properly) was take the
current value and store it on the boxObject whenever the user switched skins
(when live skin switching was still supported). The XBL object itself would be
destructed, and a new one constructed, while the boxObject would stick around,
so the new XBL object could get the stored value and restore itself.
Since we dropped support for live skin switching, we might be able to just drop
that code, in which case your patch is fine as is if you remove the
<destructor>. If we want to keep support for it in our widgets, you need to do
something like:
<constructor>
var value = this.boxObject.getProperty("value");
if (value)
this.boxObject.removeProperty("value");
else
value = this.getAttribute("value");
if (value)
this.inputField.value = value;
</constructor>
<destructor>
var value = this.inputField.value;
if (value)
this.boxObject.setProperty("value", value);
</destructor>
Comment 27•22 years ago
|
||
As Neil pointed out, the above needs some kind of check for null vs. "" returned
from getProperty() to detect when a live skin switch is done if the user deleted
the textbox's value. Otherwise we'd pick up the initial value from the attribute.
Assignee | ||
Comment 28•22 years ago
|
||
Attachment #107468 -
Attachment is obsolete: true
Comment 29•22 years ago
|
||
Comment on attachment 107474 [details] [diff] [review]
Better patch
Nice. sr=jag. Could you add a comment about why the empty <children/> is
needed, with a reference to the bug#?
Could you also file bugs on the action="" issue, and a bug on dealing with live
skin switching support on textboxes (either remove it, or fix it)?
Attachment #107474 -
Flags: superreview+
Assignee | ||
Updated•22 years ago
|
Attachment #107474 -
Flags: review?(blaker)
Updated•22 years ago
|
Attachment #107468 -
Flags: superreview?(jaggernaut)
Attachment #107468 -
Flags: review?(blaker)
Comment 31•21 years ago
|
||
Comment on attachment 107474 [details] [diff] [review]
Better patch
Neil is a peer now, can we get this checked in please? it seems really
low-risk.
Attachment #107474 -
Flags: review?(blake)
Attachment #107474 -
Flags: review+
Attachment #107474 -
Flags: approval1.6b?
Updated•21 years ago
|
Assignee: hyatt → neil.parkwaycc.co.uk
Attachment #107474 -
Flags: approval1.6b? → approval1.6b+
Comment 32•21 years ago
|
||
For 1.6b?
/be
Comment 33•21 years ago
|
||
Er, yeah, for 1.6b! Who is checking in?
/be
Comment 34•21 years ago
|
||
I got this fixed for seamonkey, asked bryner for approval to land it into the
new toolkit as well.
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
Whiteboard: seamonkey FIXED, seeking approval for new toolkit
Updated•21 years ago
|
Target Milestone: Future → mozilla1.6beta
Comment 35•21 years ago
|
||
Re-attaching patch for firebird review.
Updated•21 years ago
|
Attachment #136862 -
Flags: review?(bryner)
Comment 36•21 years ago
|
||
Comment on attachment 136862 [details] [diff] [review]
port patch to new toolkit
checked into toolkit/.
Attachment #136862 -
Flags: review?(bryner) → review+
Comment 37•21 years ago
|
||
This seems to have caused textareas to contain whitespace by default, for
example, when creating a new folder in Bookmark Manager the "Description" field
contains spaces. (in Moz 2004011508)
Assignee | ||
Comment 38•21 years ago
|
||
The XBL content sink now honours whitespace inside HTML tags, so we need to
close up the child tags.
Assignee | ||
Updated•21 years ago
|
Attachment #139289 -
Flags: superreview?(hyatt)
Attachment #139289 -
Flags: review?(hyatt)
Comment 39•21 years ago
|
||
Comment on attachment 139289 [details] [diff] [review]
Fix regression caused by xbl content sink change
sr=hyatt
Attachment #139289 -
Flags: superreview?(hyatt) → superreview+
Updated•21 years ago
|
Attachment #139289 -
Flags: review?(hyatt) → review+
Component: XP Toolkit/Widgets: XUL → XUL
QA Contact: jrgmorrison → xptoolkit.widgets
You need to log in
before you can comment on or make changes to this bug.
Description
•