question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Dragged tags shows incorrect text

See original GitHub issue

I’m submitting a … (check one with “x”)

[X] bug report => search github for a similar issue or PR before submitting
[ ] feature request
[ ] support request/question

Current behavior When dragging tags, the dragged tag is being shown as the incorrect one. Eg. if you drag “Foo” the dragged tag will show “Bar”, but when you drop it, it actually moved “Foo”. It seems that the dragged one always has the text of the tag to the right of the selected one, except when dragging the last tag in a list in which case it shows the correct tag.

Expected behavior The dragged tag should always show the correct text.

Minimal reproduction of the problem with instructions (if applicable) The issue is reproducible by dragging the “C#” tag under “Drag and drop” on the demo site: http://www.buompris.co/ng2-tag-input. The dragged tag will show as “Java” and not “C#” as expected.

What do you use to build your app: angular-cli 1.1.1 (webpack) Angular version: 4.1.3 ng2-tag-input version: 1.3.3 Browser: Tested in Chrome and Firefox on Linux

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:1
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
Gbuompriscocommented, Jun 30, 2017
1reaction
micheledicosmocommented, Jun 26, 2017

@Gbuomprisco Just cloned and played a bit with it. Can reproduce. See following examples:

Case 1

Initial

  • Have the tags: a, b, c, d, e, f Repro:
  • Start dragging f
  • Drop f in first position Expected:
  • f disappears
  • f is being dragged
  • f appears in first position Actual:
  • f disappears ✔️
  • f is being dragged ✔️
  • f appears in first position ✔️

Case 2

Initial

  • have the tags: a, b, c, d, e, f Repro:
  • Start dragging e
  • Drop e in first position Expected:
  • e disappears
  • e is being dragged
  • e appears in first position: Actual:
  • e disappears ✔️
  • f is being dragged ✖️
  • e appears in first position ✔️ (This happens with all the letters but the last one, case 1)

Notes

Console.log(storedElement) @ onDragStarted shows that storedElement is correct (dragging “a” actually dumps “a”)

Read more comments on GitHub >

github_iconTop Results From Across the Web

Is dragging a tag within text supposed to work on iOS? - Reddit
The tag is never outlined, and you can't drag it, because once the keyboard is up, that motion in iOS is for cursor...
Read more >
Preserve appearance of dragged A element when using html5 ...
I'm able to preserve the appearance of the dragged element by using DataTransfer.setDragImage . If I add the following code to the JavaScript...
Read more >
Drag operations - Web APIs - MDN Web Docs - Mozilla
In a web page, there are certain cases where a default drag behavior is used. These include text selections, images, and links. When...
Read more >
Edit document structure with the Content and Tags panels ...
Follow these steps in Adobe Acrobat Pro to view and edit tags, add alternate text to tags, create a new child tag, and...
Read more >
Adobe Acrobat Pro DC - Common Accessibility Issues
Right-click Element 1 and then click Show in Tags Panel. The <TH> or <TD> tag in the tags panel should now be highlighted....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found