From 6f8ee52e90cb96ab956fd0684f6acb3c0585b778 Mon Sep 17 00:00:00 2001 From: Jermolene Date: Sun, 3 Jul 2016 14:53:37 +0100 Subject: [PATCH] Text-editor: fix placeholder colour in Chrome --- core/modules/editor/engines/framed.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/core/modules/editor/engines/framed.js b/core/modules/editor/engines/framed.js index f46c86302..d4328c509 100644 --- a/core/modules/editor/engines/framed.js +++ b/core/modules/editor/engines/framed.js @@ -85,10 +85,14 @@ function FramedEngine(options) { Copy styles from the dummy text area to the textarea in the iframe */ FramedEngine.prototype.copyStyles = function() { + // Copy all styles $tw.utils.copyStyles(this.dummyTextArea,this.domNode); + // Override the ones that should not be set the same as the dummy textarea this.domNode.style.display = "block"; this.domNode.style.width = "100%"; this.domNode.style.margin = "0"; + // In Chrome setting -webkit-text-fill-color overrides the placeholder text colour + this.domNode.style["-webkit-text-fill-color"] = "currentcolor"; }; /*