Skip to content

Commit

Permalink
Fix the issue that clear content when paste the same content in names…
Browse files Browse the repository at this point in the history
…pace (#4919)
  • Loading branch information
BlueSodaWater committed Jul 2, 2023
1 parent 8f0331f commit c9f585b
Showing 1 changed file with 2 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -989,16 +989,8 @@ function directive($window, $translate, toastr, AppUtil, EventManager, Permissio
})
},
onChange: function (e) {
if ((e[0].action === 'insert') && (scope.namespace.hasOwnProperty("editText")) && (scope.namespace.editText.length === 0)) {
let text = ''
for (let i = 0; i < e[0].lines.length; i++) {
if (i === 0) {
text = e[0].lines[0]
} else {
text += '\r\n' + e[0].lines[i]
}
}
scope.namespace.editText = text
if ((e[0].action === 'insert') && (scope.namespace.hasOwnProperty("editText"))) {
scope.namespace.editText = e[1].session.getValue()
}

}
Expand Down

0 comments on commit c9f585b

Please sign in to comment.