This repository has been archived by the owner on Oct 2, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Error when pasting text in IE #789
Comments
erikdubbelboer
added a commit
to atomx/ui-select
that referenced
this issue
Oct 26, 2015
Add paste="expression" to allow custom paste handling. Allow pasting in tagging mode when the tagging function is not defined. In IE use window.clipboardData so jQuery is not required. Fixes angular-ui#910, angular-ui#704, angular-ui#789, angular-ui#848, angular-ui#429
erikdubbelboer
added a commit
to atomx/ui-select
that referenced
this issue
Oct 27, 2015
Add paste="expression" to allow custom paste handling. Allow pasting in tagging mode when the tagging function is not defined. In IE use window.clipboardData so jQuery is not required. Fixes angular-ui#910, angular-ui#704, angular-ui#789, angular-ui#848, angular-ui#429
erikdubbelboer
added a commit
to atomx/ui-select
that referenced
this issue
Nov 9, 2015
Add paste="expression" to allow custom paste handling. Allow pasting in tagging mode when the tagging function is not defined. In IE use window.clipboardData so jQuery is not required. Fixes angular-ui#910, angular-ui#704, angular-ui#789, angular-ui#848, angular-ui#429
danielgrippi
pushed a commit
to viewthespace/ui-select
that referenced
this issue
Jan 12, 2016
Add paste="expression" to allow custom paste handling. Allow pasting in tagging mode when the tagging function is not defined. In IE use window.clipboardData so jQuery is not required. Fixes angular-ui#910, angular-ui#704, angular-ui#789, angular-ui#848, angular-ui#429 (cherry picked from commit 5b852b3)
aaronroberson
added a commit
that referenced
this issue
Feb 18, 2016
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
The code for the event handler that is called when pasting some text into the input control throws an error because 'e.originalEvent.clipboardData' is undefined in Internet Explorer.
I found a solution on http://stackoverflow.com/questions/27738155/unable-to-get-property-getdata-of-undefined-or-null-reference-in-ie-but-not
This code applies the fix and works fine for me:
_searchInput.on('paste', function (e) {
var data;
if (window.clipboardData && window.clipboardData.getData) { // IE
data = window.clipboardData.getData('Text');
}
else if (e.originalEvent.clipboardData && e.originalEvent.clipboardData.getData) { // other browsers
data = e.originalEvent.clipboardData.getData('text/plain');
}
...
I am using jQuery 2.1.3 and AngularJS 1.3.14
The text was updated successfully, but these errors were encountered: