1
0
Fork 0
mirror of https://github.com/teampoltergeist/poltergeist.git synced 2022-11-09 12:05:00 -05:00
teampoltergeist--poltergeist/spec/support/views/attach_file.erb
Jon Leighton f80fef4b13 Fix ObsoleteNode error when using attach_file
This happened With the `jQuery File Upload` plugin, which replaces the
input after it changes, which made the node obsolete when we came to
remove to _poltergeist_selected attribute.

Closes #115
2013-01-26 23:08:49 +00:00

10 lines
202 B
Text

<script>
window.onload = function() {
var file = document.getElementById("file")
file.onchange = function() {
file.parentElement.removeChild(file)
}
}
</script>
<input type="file" id="file">