Skip to content
This repository has been archived by the owner on Oct 2, 2019. It is now read-only.

pasting issues #704

Closed
jordydejong opened this issue Feb 26, 2015 · 0 comments
Closed

pasting issues #704

jordydejong opened this issue Feb 26, 2015 · 0 comments

Comments

@jordydejong
Copy link

I'm having issues with pasting a set of values (e.g "foo,bar"). I expect 2 items to be added.

The pasting logic is only executed if I define a tagging funtion

select.js:

  _searchInput.on('paste', function (e) {
        var data = e.originalEvent.clipboardData.getData('text/plain');
        if (data && data.length > 0 && ctrl.taggingTokens.isActivated && ctrl.tagging.fct) {

However in ctrl.select, is sends the search value (which is empty at that point) to my tagging function, instead of the item which was provided to the method

  if ( ctrl.tagging.fct !== undefined && typeof item === 'string' ) {
        item = ctrl.tagging.fct(ctrl.search);

Any ideas on what I am doing wrong? Or is this a bug? If I change the line above to the following, everything seems to work fine

        item = ctrl.tagging.fct(item);
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
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 #910, #704, #789, #848, #429
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants