Hi,
The problem you describe is indeed due to the nature of the form
element. Many browsers have given it a (hardcoded) style, a block with
some margin.
Also, the input or textarea created by editable could be styled.
I'll look into the memory leakage part, but I've never really noticed it myself.
Dylan
On 8/14/06, Dossy Shiobara <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I'm trying to use jQuery and the Editable plugin to implement in-situ
> editing (ala Flickr) and it disturbs the layout, which I don't quite
> understand.
>
> I have something like this:
>
> <div>
> <label>Some label</label>: <span id="editme">Some text</span>
> ... some other text.
> </div>
>
> I set up the span as editable:
>
> $(document).ready(function() {
> $("#editme").editable("foo.adp");
> });
>
> On load, it renders like this:
>
> Some label: some text ... some other text.
>
> Once I click to edit, it renders like this:
>
> Some label: [Some text.]
> ... some other text.
>
> Once I submit, it renders like this:
>
> Some label: Some text.
> ... some other text.
>
> What gives? The span is "display: inline" so once submitted, it should
> render as it did originally, all on the same line. It looks as though
> the span is getting changed to "display: block" and/or a <br/> is being
> inserted, or something.
>
> Aha ... Editable creates a new <form> ... which IIRC is "display: block"
> ... and Editable doesn't cleanup/destroy the <form> on submit/reset.
>
> The short-term work-around I found to this is to add this to my CSS:
>
> #editme form { display: inline; }
>
> But, this isn't the whole solution. Since Editable seems to repeatedly
> create these DOM objects but never clean then up ... this would be a
> source for a memory-leak in a long-lived web application, no?
>
> -- Dossy
>
> --
> Dossy Shiobara | [EMAIL PROTECTED] | http://dossy.org/
> Panoptic Computer Network | http://panoptic.com/
> "He realized the fastest way to change is to laugh at your own
> folly -- then you can let go and quickly move on." (p. 70)
>
> _______________________________________________
> jQuery mailing list
> [email protected]
> http://jquery.com/discuss/
>
_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/