Skip to content

Commit

Permalink
Fix pasting on IE
Browse files Browse the repository at this point in the history
  • Loading branch information
ggovan authored and oriondean committed Jul 13, 2017
1 parent 93f0b5a commit 3873763
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/finput.js
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,9 @@ class Finput {
* @param {e} Clipboard event
*/
onPaste(e) {
const val = helpers.parseString(e.clipboardData.getData('text'), this.options);
// paste uses a DragEvent on IE and clipboard data is stored on the window
const clipboardData = e.clipboardData || window.clipboardData;
const val = helpers.parseString(clipboardData.getData('text'), this.options);
this.setValue(val, true);
e.preventDefault();
}
Expand Down

0 comments on commit 3873763

Please sign in to comment.