Merge pull request #348 from ziahamza/master

Release
This commit is contained in:
hamza zia 2017-05-08 10:46:25 +08:00 committed by GitHub
commit d845f66ba2

View File

@ -4,7 +4,13 @@ webui.directive("textarea", function() {
link: function(scope, element) { link: function(scope, element) {
element.attr( element.attr(
"placeholder", "placeholder",
element.attr("placeholder").replace(/\\n/g, "\n") function(index, placeholder) {
if (placeholder !== undefined) {
return placeholder.replace(/\\n/g, "\n");
} else {
return placeholder;
}
}
).bind("keydown keypress", function(event) { ).bind("keydown keypress", function(event) {
if (event.ctrlKey && event.which === 13) { if (event.ctrlKey && event.which === 13) {
event.preventDefault(); event.preventDefault();