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 571 forks source link

Uncaught NotFoundError: Failed to set the 'innerHTML' property on 'Element': The node to be removed is no longer a child of this node. Perhaps it was moved in a 'blur' event handler? #485

Open rageshpillai opened 9 years ago

rageshpillai commented 9 years ago

here is my code view file <%= best_in_place kpi[i][2], :cumulative_actual ,:as => :input, path: kpi_tracking_path(kpi[i][2].id, fiscal_start_date: @date_from, fiscal_end_date: @date_to ), :classes => 'cumilative', :activator => "#best_in_place_kpitracking#{kpi[i][2].id}_cumulative_actual", :data => {:fiscal_date => "#{@financial_start_date_jquery}"}, :display_with => lambda {|v| number_with_precision(v, precision: 2, :delimiter => ',')} if kpi[i][2] %>

controller format.json {render :json => {test: kpi_tracking, variance_bandwidth: kpi_tracking.kpi.try(:variance_bandwidth).abs, previous_month: previous_month, previous_year: previous_year, better: kpi_tracking.kpi.try(:better_value), kpi_ytd: kpi_ytd }}

js.erb

$('.cumilative').bind "ajax:success", (event, data)-> result = $.parseJSON(data) document.getElementById("best_in_place_kpitracking"+result.test.id+"_cumulative_actual").innerHTML = commaseperator(actual)

got an error while editing symoltaniously "Uncaught NotFoundError: Failed to set the 'innerHTML' property on 'Element': The node to be removed is no longer a child of this node. Perhaps it was moved in a 'blur' event handler?"

and cant edit after this error..

jpgtama commented 8 years ago

You can find the solution here:http://stackoverflow.com/a/22934552/906945