Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/CoreHome/angularjs/common/directives/attributes.js')
-rw-r--r--plugins/CoreHome/angularjs/common/directives/attributes.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/plugins/CoreHome/angularjs/common/directives/attributes.js b/plugins/CoreHome/angularjs/common/directives/attributes.js
index 825ed22b96..4c59d71cc2 100644
--- a/plugins/CoreHome/angularjs/common/directives/attributes.js
+++ b/plugins/CoreHome/angularjs/common/directives/attributes.js
@@ -35,6 +35,13 @@
if (angular.isObject(value)) {
value = JSON.stringify(value);
}
+
+ // replace line breaks in placeholder with big amount of spaces for safari,
+ // as line breaks are not support there
+ if (key === 'placeholder' && /^((?!chrome|android).)*safari/i.test(navigator.userAgent)) {
+ value = value.replace(/(?:\r\n|\r|\n)/g, (new Array(200)).join(' '));
+ }
+
if (key === 'disabled') {
element.prop(key, value);
} else {