You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are two problems: 1. if comment.parent is not nil, the id will not end in -body, hence it won't get focus 2. without the -body suffix, the id is actually a duplicate of another id, breaking e.g. id selectors.
My quick fix is to change _form.html.erb so that it reads:
The autofocusing code does not work when replying to a comment, it only works when creating a new comment. The code in _new.js.erb is:
And in _form.html.erb, the id is set as follows:
There are two problems: 1. if comment.parent is not nil, the id will not end in -body, hence it won't get focus 2. without the -body suffix, the id is actually a duplicate of another id, breaking e.g. id selectors.
My quick fix is to change _form.html.erb so that it reads:
The text was updated successfully, but these errors were encountered: