bernat / best_in_place

A RESTful unobtrusive jQuery Inplace-Editor and a helper as a Rails Gem
http://blog.bernatfarrero.com/in-place-editing-with-javascript-jquery-and-rails-3/
1.2k stars 572 forks source link

Place_holder isn't triggered at same time as normal calls #607

Open etcook opened 6 years ago

etcook commented 6 years ago

I'm using best_in_place within ajax datatables and everything is working perfectly unless it's an empty field. In this case, the placeholder field isn't activated. I can manually call jQuery('.best_in_place').best_in_place() in the console, which will then trigger the place_holder fields, but it's already been called and working for the normal spans.

TerenceLyu commented 5 years ago

I am having the same issue. Did you got it fixed or did you find some workarounds?

qmclaugh commented 5 years ago

Yes, I see this too.

etcook commented 5 years ago

@TerenceLyu Sorry for the delay in responding. I did create a workaround, mostly by instantiating a new object as a placeholder and then feeding best_in_place a fake name so that there was always an object to click on. It's not an elegant solution at all, but it works.