Merge pull request #1395 from praseetht/master
Fix #1394: A bug in IE 10/11 causes the placeholder text to be copied to value
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user