Opened 13 years ago
Closed 13 years ago
#4097 closed defect (fixed)
InlineEditBox: design problem with throwing away srcNodeRef
Reported by: | bill | Owned by: | bill |
---|---|---|---|
Priority: | high | Milestone: | 1.0 |
Component: | Dijit | Version: | 0.9 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description (last modified by )
The 0.9 InlineEditBox? widget has an initial design flaw in the way that it displays editable, the view (read-only) version of the text.
Currently, it throws away srcNodeRef and replaces it with a <span> named "editable". It then tries to make the <span> look like the original srcNodeRef by copying styles, but that doesn't really work. For example, copying width will fail. If the original srcNodeRef is:
<div style="width: 50%"> ... </div>
Then it will end up setting the <span> to have width=600px, the computed width of the <div> at the time the widget was instantiated. But if the user resizes the browser window the <span> won't resize, even though it should go to 50%.
Also, copying the styles requires a call to getComputedStyle() during widget initialization which is against our rules, because it doesn't work on elements where one of the ancestors is display:none, at least not in safari. Which means there will be problems putting InlineEditBox? in the non-selected tab.
InlineEditBox? should work like 0.4 where we keep the original srcNodeRef in the document.
See related bug #4098.
Change History (10)
comment:1 Changed 13 years ago by
Description: | modified (diff) |
---|
comment:2 Changed 13 years ago by
Owner: | changed from haysmark to Douglas Hays |
---|
comment:3 Changed 13 years ago by
comment:4 Changed 13 years ago by
Owner: | changed from Douglas Hays to bill |
---|
InlineEditBox? being redesigned by bill
comment:5 Changed 13 years ago by
(In [10631]) Start refactor of InlineEditBox? to keep original srcNode, and create edit widget on demand. Code not working (well) yet. Refs #4097, #4098.
comment:6 Changed 13 years ago by
(In [10824]) Continue InlineEditBox? work. Since we can't compute the width of a <span> on IE, since it's display:inline, I had to put a width="..." parameter for the widget. Refs #4097, #4098.
comment:7 Changed 13 years ago by
comment:8 Changed 13 years ago by
comment:9 Changed 13 years ago by
comment:10 Changed 13 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
(In [10354]) Better testcase for how I want InlineEditBox? to work.
you specify the width of an <input>... ie, a width that is unrelated to the width of the current value.
browser's builtin rules for <p>, <h3>, etc. (All such style info must appear in the non-editing version of the text and the edit version of the tet.)
unwanted line breaks (see #4098 for possible solution).
Refs #4097, #4098, #4167.