This patch catches and discards enter keydown events when the
focus is in a contenteditable subfield value div; otherwise, newlines
can infect the MARC record.
Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
Signed-off-by: Kathy Lussier <klussier@masslnc.org>
addDatafield(event, event.shiftKey); // shift key inserts before
event_return = false;
+ } else if (event.which == 13 &&
+ ($(event.target).hasClass('marcsf') || $(event.target.parentNode).hasClass('marcsf'))
+ ) {
+ // bare return; don't allow it
+ event_return = false;
+
} else if (event.which == 46 && event.ctrlKey) { // ctrl+del, remove field
deleteDatafield(event);
event_return = false;