Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Components: URL input popover animates repeatedly on text/selection change #14872

Closed
aduth opened this issue Apr 8, 2019 · 4 comments · Fixed by #14938
Closed

Components: URL input popover animates repeatedly on text/selection change #14872

aduth opened this issue Apr 8, 2019 · 4 comments · Fixed by #14938
Labels
[Feature] UI Components Impacts or related to the UI component system [Package] Components /packages/components [Type] Bug An existing feature does not function as intended

Comments

@aduth
Copy link
Member

aduth commented Apr 8, 2019

Previously: #13617

Describe the bug

When changing the text within a linked segment, or moving the selection caret using arrow keys, the link popover animates repeatedly.

To reproduce

  1. Navigate to Posts > Add New
  2. Click the writing prompt
  3. Insert some text
  4. Apply a link to said text
  5. Select within the linked fragment of text
  6. Change the linked text, or simply use arrow keys within to change caret position
  7. Note that the popover animates in response to each input

Expected behavior

The Popover should only animate once when first shown, not on input.

Screenshots

url-animation

Desktop:

  • OS: macOS Mojave 10.14.4 (18E226)
  • Browser: Chrome Version 73.0.3683.103 (Official Build) (64-bit)
  • Version: master (1df3021)
@aduth aduth added [Type] Bug An existing feature does not function as intended [Feature] UI Components Impacts or related to the UI component system [Package] Components /packages/components labels Apr 8, 2019
@ellatrix
Copy link
Member

I guess it would be best for the toolbar to be positioned relative to the link element, not the caret. Happy to look into it.

@aduth
Copy link
Member Author

aduth commented Apr 10, 2019

I guess it would be best for the toolbar to be positioned relative to the link element, not the caret. Happy to look into it.

I hadn't considered that (vs. just preventing the repeated animation), but that sounds both a general improvement and likely solution to the bug!

@ellatrix
Copy link
Member

I'll have a look at this as well unless someone figures it out before I'm able to start looking into it. First looking into #14871.

@talldan
Copy link
Contributor

talldan commented Apr 11, 2019

There's a related issue that I made a while back - #11092

Back then I tried to resolve the problem by aligning the popover to the formatting boundary, but a separate issue made it hard to implement - #11091. Now that's resolved it should be a bit easier.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] UI Components Impacts or related to the UI component system [Package] Components /packages/components [Type] Bug An existing feature does not function as intended
Projects
None yet
3 participants