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

AutocompleteInput's tooltip's initial x-position is incorrectly calculated when added via ArrayInput/SimpleFormIterator #2541

Closed
kctrlv opened this issue Nov 15, 2018 · 3 comments

Comments

@kctrlv
Copy link

kctrlv commented Nov 15, 2018

Within an Edit page, when adding a new ReferenceInput/AutocompleteInput into an ArrayInput/SimpleFormIterator component, the hidden tooltip that gets created has an incorrectly calculated x-position parameter in its transform: translate3d property. When a user clicks the new field, the tooltip is not showing up properly, until they scroll the page.

Steps to reproduce:
Please use the modified demo app @ https://codesandbox.io/s/jk89y91vw

  1. Go to CommentEdit
  2. Add a new Post to the array
  3. Do not scroll the window.
  4. Click into the new field (autocompleteinput).
  5. Notice that the tooltip (suggestions list) is incorrectly positioned somewhere off the screen.
  6. Scroll the window, and notice that it appears where it should be.
  7. Go back to step 2 to repeat, but first inspect another AutocompleteInput's tooltip (suggestions list) that is already correctly positioned. When you add the new one, you can find the new element's transform: translate3d(xposition) was incorrectly calculated. Once you scroll the page, it auto-corrects.
  • React-admin version: 2.4.1

screen shot 2018-11-15 at 3 18 08 pm

The screenshot above is the inspection of the AutocompleteInput fields that were added in the Array. The first element was already on the page with the correct x-position value (79px). The second was just added and has an incorrect position, until the user scrolls the page.

@kctrlv kctrlv changed the title AutocompleteInput's tooltip's initial x-position is incorrectly caclulated when added via ArrayInput/SimpleFormIterator AutocompleteInput's tooltip's initial x-position is incorrectly calculated when added via ArrayInput/SimpleFormIterator Nov 15, 2018
@marquesgabriel
Copy link
Contributor

i'm experiencing the same issue. Did you find any way to solve this?

@marquesgabriel
Copy link
Contributor

The new version (2.5.1) corrected this

@fzaninotto
Copy link
Member

Fixed by #2607

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants