Commit Graph

4 Commits

Author SHA1 Message Date
Senén Rodero Rodríguez
f4916a981a Fix focus deprecation warning 2020-08-28 16:09:41 +02:00
Senén Rodero Rodríguez
6b17452bd5 Fix "Publish comment" button when restoring a page from browser cache
We need to use page body event delegation so it will work with any
element even with the ones added through ajax, in this case the
annotation comments box form. By doing this way we do not need
this code on the server response anymore.

Furthermore JS events defined at ajax responses are not part of
application javascript and are lost when restoring a page from
browser cache, you can try to apply the same event delegation
technique to the `erb` file and it wont work just because events
added dinamically are not treated the same than `application.js`
code.

To reproduce the error:

  1. Load an annotatable draft version
  2. Move to any other page
  3. Go back

Now "Publish comment" button wont work.
2020-08-12 10:07:35 +02:00
Julian Herrero
2b83be1c7c Use double quotes in app/views/legislation 2019-03-19 12:16:50 +01:00
Amaia Castro
c7eaadb4b2 Show comment boxes for all annotations at the clicked point 2017-02-24 15:45:36 +01:00