AnanthaKN / jquery-in-place-editor

Automatically exported from code.google.com/p/jquery-in-place-editor
Other
0 stars 0 forks source link

editable term inside a form #51

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. editInPlace of an <li></li> element which is inside a form does not
seems to work
2. when clicking in the editable term, everything was just disapearing

My solution was to comment .find('form') at line 193

this.dom.html('<form class="inplace_form" style="display: inline; margin:
0; padding: 0;"></form>')
  //.find('form')
  .append(editorElement)
  .append(buttons_html);

What version of the product are you using? On what operating system?
editiinplace 2.0.0
firefox 3.6.5
jquery 1.4.1

was working with editinplace-1.0.1.js

Original issue reported on code.google.com by alexandr...@gmail.com on 3 May 2010 at 10:00

GoogleCodeExporter commented 8 years ago
Indeed, it was not sufficient of course!
But adding a form field to the editiInPlace instance looks to make the work

I was not sure to understand why you are keeping the interaction directly with 
the
DOM (but I'm not a javascript expert...)

Alex

diff web-app/js/jquery/jquery.editinplace.js
~/Downloads/jquery-editInPlace-v2.0.0/lib/jquery.editinplace.js 
66d65
<   var form;
193,195c192,195
<       this.form=this.dom.html('<form class="inplace_form" style="display: inline;
margin: 0; padding: 0;"></form>')
<       this.form.append(editorElement)
<                .append(buttons_html);
---
>       this.dom.html('<form class="inplace_form" style="display: inline; margin: 0;
padding: 0;"></form>')
>           .find('form')
>               .append(editorElement)
>               .append(buttons_html);
258c258
<       var form = this.form;
---
>       var form = this.dom.find("form");

Original comment by alexandr...@gmail.com on 3 May 2010 at 10:18

GoogleCodeExporter commented 8 years ago
I'm not exactly sure I understand what this patch changes, it seems to do 
exactly the same as before? Could you 
perhaps provide your problem as a testcase so I can understand why this matters?

Thanks in advance!

Original comment by martin.h...@googlemail.com on 11 May 2010 at 7:27

GoogleCodeExporter commented 8 years ago
I'm stumped by this, because it looks like you are adding the edit in place 
elements after the form element 
instead of as childs of it. Are you sure that you don't see a different bug 
here?

Original comment by mhaec...@gmail.com on 13 May 2010 at 4:46

GoogleCodeExporter commented 8 years ago
I think you are seing a problem because of nested forms in your setup and not 
an issue of the inplace editor. 

Please feel free to reopen this issue if that's not the case. :-)

Original comment by mhaec...@gmail.com on 22 May 2010 at 5:00