Opened 13 years ago
Closed 13 years ago
#4362 closed defect (fixed)
dijit.form.InlineEditBox displays "?" on value=null.
Reported by: | guest | Owned by: | bill |
---|---|---|---|
Priority: | high | Milestone: | 1.0 |
Component: | Dijit | Version: | 0.9 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description
The dijit.form.InlineEditBox? displays a question mark whenever the control inside the InlineEditBox? has a value of null.
Test Case:
-Goto "test_InlineEditBox.html" under "dijit estsform".
-Set the value property to null ("") of the textbox in the span w/ id=editable. Currently the value property is "Edit me - I trigger the onChange callback".
-Open the page in your web browser (ie7 and firefox 2.0.0.4 tested)
-The result should be a "?" in the inlineEditBox where it used to say "Edit me - I trigger the onChange callback".
Change History (10)
comment:1 follow-ups: 2 5 Changed 13 years ago by
Resolution: | → invalid |
---|---|
Status: | new → closed |
comment:2 Changed 13 years ago by
If you modify the width property in the style attribute of the textbox inside the span, the clickable part of the inlineEditBox is sized accordingly.
Here's an example that illustrates the merit of an alternate solution: what if a guy wanted to use it in a table? Say that a field didn't contain a value. A "?" instead of a blank space would confuse the user. They didn't type a "?"; why is it there?
It makes more sense to me for it to work this way. I posted it here b/c peller seemed to think it was a bug. If its not, can you explain how I might kludge up dojo to work my way?
comment:3 Changed 13 years ago by
Resolution: | invalid |
---|---|
Status: | closed → reopened |
comment:4 Changed 13 years ago by
sorry, seemed like a bug to me. Yeah, it does look like the user typed a '?'. So we need something there, huh? Is there some dingbat-type thing we can use instead that might look a little less confusing?
comment:5 follow-up: 6 Changed 13 years ago by
Replying to bill:
This is by design; otherwise on a span with no contents there'd be nowhere to click to edit it. Do you have an alternate idea of how it should work?
I wasn't too clear with this earlier, but the size of the clickable area in an inlineEditBox isn't necessarily based on the amount of text entered, but the width of the nested control. If you don't explicitly set it, it autosizes based on the text entered, but if you set it yourself, the clickable area is whatever size you make the control's width.
comment:6 Changed 13 years ago by
Well, I got my answer in the forums. I appreciate the help you guys have given me and keep up the good work!
comment:7 follow-up: 8 Changed 13 years ago by
OK, what answer did you get in the forums (can you give a link to the forum topic)?
I agree the current design isn't suitable for tables. And I agree a symbol would be better than a question mark. I'm curious what kind of behavior you would suggest. Have a question mark only if the width would otherwise be 0? Or require user to specify a width of the read-only text, so even a blank value takes (for example) 100px?
comment:8 Changed 13 years ago by
Replying to bill:
OK, what answer did you get in the forums (can you give a link to the forum topic)?
I agree the current design isn't suitable for tables. And I agree a symbol would be better than a question mark. I'm curious what kind of behavior you would suggest. Have a question mark only if the width would otherwise be 0? Or require user to specify a width of the read-only text, so even a blank value takes (for example) 100px?
Here's my forum post: http://dojotoolkit.org/forum/dijit-dijit-0-9/dijit-support/dijit-form-inlineeditbox-displays-null-how-can-i-change
I hadn't thought of looking for it in the code, as I'm somewhat new to dojo and javascript.
Anyway, I think that the null field string should be definable in the inlineEditBox tag. I see a great need for customization there; I personally changed mine to N/A, per my user's request. Also, maybe the inlineEditBox can also have a width, too, like it used to in earlier versions of dojo, but it only be used if the nested control's value is null? I think that would be a good way to handle it.
comment:9 Changed 13 years ago by
Milestone: | → 1.0 |
---|---|
Owner: | set to bill |
Status: | reopened → new |
comment:10 Changed 13 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
This is by design; otherwise on a span with no contents there'd be nowhere to click to edit it. Do you have an alternate idea of how it should work?