From 8f3909713fa5b593bc96192060d89f6705a3b1c3 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Sun, 8 Oct 2017 17:59:40 -0400 Subject: [PATCH] Save note on forward-delete when text is selected This doesn't generate a keypress event for some reason, even though it does when no text is selected. --- chrome/content/zotero/bindings/styled-textbox.xml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/chrome/content/zotero/bindings/styled-textbox.xml b/chrome/content/zotero/bindings/styled-textbox.xml index b7371eb7678..508d5caa810 100644 --- a/chrome/content/zotero/bindings/styled-textbox.xml +++ b/chrome/content/zotero/bindings/styled-textbox.xml @@ -416,6 +416,12 @@ this.redo(); return; } + // Handle forward-delete, which doesn't register as a keypress + // when a selection is cleared + if (event.which == event.DOM_VK_DELETE) { + this._changed = true; + commandEvent = true; + } break; case 'keypress':