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

[FIX] Wrong positioning of popover when using RTL languages #10428

Merged
merged 7 commits into from
Apr 17, 2018

Conversation

ggazzo
Copy link
Member

@ggazzo ggazzo commented Apr 11, 2018

now you can just pass the anchor element as currentTarget and the script will find the right position

Closes #10068

before:
image

after:
image

@ggazzo ggazzo requested a review from karlprieb April 11, 2018 18:01
@engelgabriel engelgabriel temporarily deployed to rocket-chat-pr-10428 April 11, 2018 18:01 Inactive
top: `${ e.currentTarget.getBoundingClientRect().bottom + 10 }px`,
left: `${ e.currentTarget.getBoundingClientRect().left - 10 }px`
top: `${ e.currentTarget.getBoundingClientRect().bottom + 10 }px`
// left: `${ e.currentTarget.getBoundingClientRect().left - 10 }px`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove comments

@@ -75,7 +78,7 @@ Template.popover.onRendered(function() {
}

popoverContent.style.top = `${ top }px`;
popoverContent.style.left = `${ left }px`;
popoverContent.style.left = `${ isRtl() ? left : left }px`;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left and Left? No need for conditional then.

Copy link
Contributor

@karlprieb karlprieb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you remove all comments?

@ggazzo ggazzo temporarily deployed to rocket-chat-pr-10428 April 11, 2018 19:15 Inactive
@ggazzo
Copy link
Member Author

ggazzo commented Apr 11, 2018

please remove the comments.

karlprieb
karlprieb previously approved these changes Apr 11, 2018
gdelavald
gdelavald previously approved these changes Apr 11, 2018
@karlprieb karlprieb added this to the 0.64.0 milestone Apr 11, 2018
@faziloub
Copy link

still some issues in design
screenshot-rocket-chat-pr-10428 herokuapp com-2018 04 12-07-01-02
screenshot-rocket-chat-pr-10428 herokuapp com-2018 04 12-07-01-49

@ggazzo
Copy link
Member Author

ggazzo commented Apr 12, 2018

@fifou17 actually this is another problem, but I will fix it here..

@ggazzo ggazzo dismissed stale reviews from gdelavald and karlprieb via 540c0e9 April 12, 2018 18:49
@ggazzo ggazzo temporarily deployed to rocket-chat-pr-10428 April 12, 2018 18:49 Inactive
@karlprieb
Copy link
Contributor

The top property calc is wrong
image

@karlprieb karlprieb self-assigned this Apr 12, 2018
@engelgabriel engelgabriel temporarily deployed to rocket-chat-pr-10428 April 13, 2018 19:33 Inactive
@engelgabriel engelgabriel temporarily deployed to rocket-chat-pr-10428 April 13, 2018 19:39 Inactive
@engelgabriel engelgabriel temporarily deployed to rocket-chat-pr-10428 April 16, 2018 18:47 Inactive
@rodrigok rodrigok changed the title [FIX] render popover to other side on RTL [FIX] Wrong positioning of popover when using RTL languages Apr 17, 2018
@rodrigok rodrigok merged commit ddcaa5b into develop Apr 17, 2018
@rodrigok rodrigok deleted the fix-popover-rtl branch April 17, 2018 17:40
@rodrigok rodrigok mentioned this pull request Apr 28, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Menu in RTL isnt in place
6 participants