Google docs bug

ID D2016700117

Every time I try to add a new citation or edit an existing one, Zotero deletes the character before and after the cursor. This results in changing the text of the manuscript in the first case, or deleting the citation completely and losing the name and year of the document I try to edit in the second case.

I have replicated this behaviour in both Chrome, Firefox and Edge, but not if I modify the document in Microsoft Word 2019.

I find it quite strange since it was working fine and out of the blue started with this behaviour. Please let me know if you need more information
  • edited January 9, 2021
    Update:

    Sometimes I get this error dialog: "Cannot read property 'startsWith' of null". Debug ID is D948067079

    On the other hand, I have changed from Vancouver (superscript) to Vancouver without success, but after that I switched to APA and the problem does not occur with that citation style. Again, it was working just fine until it started with this bizarre behaviour.
  • Can you reproduce this in a new document? If not, can you cut down your existing document to a minimal sample and share it with support@zotero.org?
  • edited January 11, 2021
    Hi there @adomasven

    The problem is present even with a brand new document with some random text, or if I copy some text from the original and paste in a blank document, or if I try to cite other papers.

    I have shared two documents, one with some random text and the other with some cut parts from the original.

    I really hope you can find a solution.
  • Please send share links rather than inviting support@zotero.org directly.
  • Before Zotero performs a Google Docs operation it inserts a spacebar and then deletes it again. This is necessary to ensure we detect whether the cursor is in a citation or not. I cannot reproduce any characters being deleted from the documents you have shared with us. Are you sure you are able to reproduce actual text being removed by Zotero with Chrome and other browsers (rather than the normal cursor jitter before an operation)? Note that if you have text highlighted and use the Zotero button it will delete the highlighted text, but that is no different than with Word.
  • edited January 12, 2021
    Yes, I have tried in Chrome, Firefox and Edge, and its behaviour is still the same. I even tried to disable every extension except Zotero connector but there is no difference. I have also tried in a blank new document or citing different references with no luck.

    If I try to edit an existing citation, it keeps deleting the cite number itself plus the character after (being a space, line break or whatever). For example, while editing 'lorem(1) ipsum' it deteles '(1)' while losing the existing citation; if I add a citation it becomes 'lorem(1)ipsum' but if decide to cancel it becomes 'loremipsum'.

    If I try to add a new citation, it adds the mentioned space but deletes it immediately before even using the Zotero search dialog. For example, 'lorem ipsum' becomes 'loremipsum'. Then it has the same behavior than before, resulting in 'lorem(1)ipsum' or 'loremipsum' instead of 'lorem(1) ipsum' or 'lorem ipsum'.

    The only thing that has made a difference is changing the citation style away from numbers (being between brackets or not, normal height or superscript, doesn't matter) to something like 'Doe J, 2021'. This way it still deletes the character after the cursor while adding a new citation, but it doesn't delete the citation while editing it.

    Is there any possibility to try installing an older version of the connector to check if there is something wrong with me and the latest update?
  • If it's broken across all browsers this is unlikely related to the Connector version, more so since we haven't touched the part of the code that would be causing the bug here in over a year. Do you have any system-wide applications that somehow interact with you keyboard input? Perhaps provide global shortcuts or similar? Do you run any security software?
  • *update*
    I've always used Zotero on my laptop and I haven't changed its setup nor installed any software to interact with my keyboard or global shortcuts. I uninstalled my antivirus and left Windows Defender alone, but no change.

    I even uninstalled Zotero and reinstalled it again with no luck.

    I also tried with a live Ubuntu on a USB with latest versions of Zotero and connector, and the problem is still there. I don't know if there is something wrong with my university's Google Docs config or something like that.
  • Ok, thanks for walking me through this. I've finally managed to reproduce it, the issue appears to only occur when the cursor is at the very end/right edge of the citation. We've published a Zotero Connector Beta for Firefox which should address the issue. Could you test with that version and confirm whether the issue is gone for you?
  • edited January 15, 2021
    Now it works as it should when editing an existing citation. I have tried with different Vancouver styles (the faulty ones for me) plus APA and Chicago, and everything seems just fine.

    Many thanks for your time and patience!

    *update*
    It's deleting the last character before the cursor position when adding a new citation, even if it's a line break, an space or whatever.
Sign In or Register to comment.