Commit f3cb3fad authored by ronaldtebrake's avatar ronaldtebrake Committed by Robert Ragas

Issue #2636836 by ronaldtebrake: Snippet updates meta values to undefined in FireFox

parent d7387585
......@@ -175,7 +175,9 @@ YoastSEO_DrupalSource.prototype.triggerEvent = function(field) {
*/
YoastSEO_DrupalSource.prototype.parseSnippetData = function(source, target) {
var listener = function ( ev ) {
document.getElementById(target).value = ev.target.innerText;
// textContent support for FF and if both innerText and textContent are
// undefined we use an empty string.
document.getElementById(target).value = (ev.target.innerText || ev.target.textContent || "");
this.triggerEvent(target);
}.bind(this);
document.getElementById(source).addEventListener("blur", listener);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment