From 6d4bc72a64b02efabe931aee2fa4e53b4b400217 Mon Sep 17 00:00:00 2001 From: Praseeth T Date: Sun, 21 Jun 2015 11:37:29 +0530 Subject: [PATCH] Fix #1394: A bug in IE 10/11 causes the placeholder text to be copied to "value" --- src/main/javascript/view/SignatureView.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/javascript/view/SignatureView.js b/src/main/javascript/view/SignatureView.js index 29095f80..c0f8bd40 100644 --- a/src/main/javascript/view/SignatureView.js +++ b/src/main/javascript/view/SignatureView.js @@ -52,7 +52,9 @@ SwaggerUi.Views.SignatureView = Backbone.View.extend({ if (e) { e.preventDefault(); } var textArea = $('textarea', $(this.el.parentNode.parentNode.parentNode)); - if ($.trim(textArea.val()) === '') { + + // Fix for bug in IE 10/11 which causes placeholder text to be copied to "value" + if ($.trim(textArea.val()) === '' || textArea.prop('placeholder') === textArea.val()) { textArea.val(this.model.sampleJSON); } }