Merge branch '41563-fix-branch-creation-from-issue-in-firefox' into 'master'

Fix custom name in branch creation for issue in Firefox

Closes #41563

See merge request gitlab-org/gitlab-ce!16244
This commit is contained in:
Fatih Acet 2018-01-05 15:34:26 +00:00
commit ae46ceaab0

View file

@ -276,13 +276,13 @@ export default class CreateMergeRequestDropdown {
let target;
let value;
if (event.srcElement === this.branchInput) {
if (event.target === this.branchInput) {
target = 'branch';
value = this.branchInput.value;
} else if (event.srcElement === this.refInput) {
} else if (event.target === this.refInput) {
target = 'ref';
value = event.srcElement.value.slice(0, event.srcElement.selectionStart) +
event.srcElement.value.slice(event.srcElement.selectionEnd);
value = event.target.value.slice(0, event.target.selectionStart) +
event.target.value.slice(event.target.selectionEnd);
} else {
return false;
}