Skip to content

Commit 9999d68

Browse files
stephanielearytmccanna
authored andcommitted
LP2095532 Ctrl+arrow creates only one new MARC row
In the MARC rich editor, call preventDefault() and stopPropagation() on keydown handlers when pressing Control + the up or down arrow to avoid creating duplicate copies of the current row (due to similar handlers in both the editable content and rich editor components). See also bug 2084199 for related keyboard operation errors prior to 3.13.6 and 3.14.1. Release-note: Prevents duplicate new MARC rows using Control + Arrow key Signed-off-by: Stephanie Leary <[email protected]> Signed-off-by: Carol Witt <[email protected]> Signed-off-by: Terran McCanna <[email protected]>
1 parent 30865c0 commit 9999d68

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Open-ILS/src/eg2/src/app/staff/share/marc-edit/editable-content.component.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -564,6 +564,8 @@ implements OnInit, AfterViewInit, OnDestroy {
564564

565565
if (evt.ctrlKey && !evt.shiftKey && !(this.fieldType === 'ldr' || this.fieldType === 'ffld')) {
566566
// ctrl+down == copy current field down one
567+
evt.preventDefault();
568+
evt.stopPropagation();
567569
this.context.insertField(
568570
this.field, this.record.cloneField(this.field));
569571
}
@@ -587,6 +589,8 @@ implements OnInit, AfterViewInit, OnDestroy {
587589

588590
if (evt.ctrlKey && !evt.shiftKey && !(this.fieldType === 'ldr' || this.fieldType === 'ffld')) {
589591
// ctrl+up == copy current field up one
592+
evt.preventDefault();
593+
evt.stopPropagation();
590594
this.context.insertField(
591595
this.field, this.record.cloneField(this.field), true);
592596
}

0 commit comments

Comments
 (0)