Commit f4c2eeb2 authored by Eric Eastwood's avatar Eric Eastwood

Fix custom name in branch creation for issue in Firefox

Fix https://gitlab.com/gitlab-org/gitlab-ce/issues/41563

`event.srcElement` is non-standard,
https://developer.mozilla.org/en-US/docs/Web/API/Event/srcElement
parent 545489a5
...@@ -276,13 +276,13 @@ export default class CreateMergeRequestDropdown { ...@@ -276,13 +276,13 @@ export default class CreateMergeRequestDropdown {
let target; let target;
let value; let value;
if (event.srcElement === this.branchInput) { if (event.target === this.branchInput) {
target = 'branch'; target = 'branch';
value = this.branchInput.value; value = this.branchInput.value;
} else if (event.srcElement === this.refInput) { } else if (event.target === this.refInput) {
target = 'ref'; target = 'ref';
value = event.srcElement.value.slice(0, event.srcElement.selectionStart) + value = event.target.value.slice(0, event.target.selectionStart) +
event.srcElement.value.slice(event.srcElement.selectionEnd); event.target.value.slice(event.target.selectionEnd);
} else { } else {
return false; return false;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment