Fix focus deprecation warning
This commit is contained in:
@@ -109,7 +109,7 @@
|
|||||||
});
|
});
|
||||||
if ($("[data-legislation-open-phase]").data("legislation-open-phase") !== false) {
|
if ($("[data-legislation-open-phase]").data("legislation-open-phase") !== false) {
|
||||||
App.LegislationAnnotatable.highlight("#7fff9a");
|
App.LegislationAnnotatable.highlight("#7fff9a");
|
||||||
$("#comments-box textarea").focus();
|
$("#comments-box textarea").trigger("focus");
|
||||||
$("#new_legislation_annotation").on("ajax:complete", function(e, data) {
|
$("#new_legislation_annotation").on("ajax:complete", function(e, data) {
|
||||||
if (data.status === 200) {
|
if (data.status === 200) {
|
||||||
App.LegislationAnnotatable.remove_highlight();
|
App.LegislationAnnotatable.remove_highlight();
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<% if comment.errors.any? %>
|
<% if comment.errors.any? %>
|
||||||
$("#comments-box-<%= @annotation.id %> a.publish-comment").hide();
|
$("#comments-box-<%= @annotation.id %> a.publish-comment").hide();
|
||||||
$("#js-comment-form-annotation-<%= annotation.id %>").toggle();
|
$("#js-comment-form-annotation-<%= annotation.id %>").toggle();
|
||||||
$("#js-comment-form-annotation-<%= annotation.id %> textarea").focus();
|
$("#js-comment-form-annotation-<%= annotation.id %> textarea").trigger("focus");
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|||||||
Reference in New Issue
Block a user