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

[Popover] Scroll Container issue #7472

Merged

Conversation

gorkemcnr
Copy link

@gorkemcnr gorkemcnr commented Jul 19, 2017

- As discussed on mui#4393 and mui#4783 I have provided a fix for popover position issue on autocomplete.
@oliviertassinari oliviertassinari added the component: Popover The React component. label Jul 19, 2017
@oliviertassinari oliviertassinari changed the title [Popover] Scroll Container issue #4783 [Popover] Scroll Container issue Jul 19, 2017
@oliviertassinari oliviertassinari added the PR: needs revision The pull request can't be merged. More details is available on the code review or fails in the CI label Jul 19, 2017
Copy link
Member

@oliviertassinari oliviertassinari left a comment

Choose a reason for hiding this comment

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

Some small changes needed, but it's good overall 👍 .

@@ -395,7 +402,7 @@ class Popover extends Component {
return (
<div style={styles.root}>
<EventListener
target="window"
target={this.props.scrollElement || "window"}
Copy link
Member

Choose a reason for hiding this comment

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

What about using a defaultProps instead?

@@ -89,6 +89,13 @@ class Popover extends Component {
* The zDepth of the popover.
*/
zDepth: propTypes.zDepth,
/**
* TODO
Copy link
Member

Choose a reason for hiding this comment

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

Can we have a description for the documentation?

Gorkem CINAR and others added 3 commits July 21, 2017 09:36
-Prop name is changed to a more meaningful name
…com/gorkemcnr/material-ui into 4783-AutoCompletePopoverScrollIssue

# Conflicts:
#	src/Popover/Popover.js
@gorkemcnr
Copy link
Author

Hi @oliviertassinari,

When you guys planning to release those changes?

@oliviertassinari
Copy link
Member

@gorkemcnr First, we need to get the build green to merge the PR.

@oliviertassinari oliviertassinari added PR: Review Accepted and removed PR: needs revision The pull request can't be merged. More details is available on the code review or fails in the CI labels Jul 21, 2017
@oliviertassinari oliviertassinari merged commit 4f2b78f into mui:master Jul 21, 2017
@oliviertassinari
Copy link
Member

Thanks, we will try to do a release by this weekend.

djbuckley added a commit to manchesergit/material-ui that referenced this pull request Jul 24, 2017
* call_em_all_-_master/master:
  fix: comment typo (mui#7523)
  [Docs] Add v0.18.7 to versions.json
  v0.18.7
  [CHANGELOG] Prepare v0.18.7
  [ListItem] Fix triggers onTouchTap when disabled (mui#7486)
  [Popover] Scroll Container issue (mui#7472)
  [Table] Don't set height to tbody (mui#7484)
  docs: fix typo in Avatar readme (mui#7478)

# Conflicts:
#	src/Popover/Popover.js
# merged both versions
targetEl.style.top = `${Math.max(0, targetPosition.top)}px`;
targetEl.style.left = `${Math.max(0, targetPosition.left)}px`;
targetEl.style.top = `${targetPosition.top}px`;
targetEl.style.left = `${targetPosition.left}px`;

Choose a reason for hiding this comment

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

This change appears to be breaking large lists where the scrolling container (e.g. window) doesn't actually scroll. Previously prior to this change, having the 'Math.max' bit allowed the popover content to scroll rather than the scrolling container, but by allowing the popover to now extend beyond the bounds of the target element, this is broken. Could we perhaps have a new prop to bring back clamping to 0?

Choose a reason for hiding this comment

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

I have created issue #7573 for this.

Copy link
Member

Choose a reason for hiding this comment

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

@jamespizzurro Oh, we can always revert. I think that we will soon freeze the master branch. Fixes have been introducing too many regressions lately, the master doesn't have enough tests.

adam187 added a commit to adam187/material-ui that referenced this pull request Nov 21, 2017
…om-build

* fix/broken-touch-scroll-on-nested-menu-items:
  [Menu] Ignore loosing focus on click away for item with menu items
  [examples] Remove browserify
  Fixes mui#7559 (mui#7560)
  [docs] Update ROADMAP (mui#7543)
  [Table] Row click on empty cell to not die in IE (mui#7520)
  Internal(EnhancedSwitch): fix checked prop (mui#7499)
  fix: comment typo (mui#7523)
  [Docs] Add v0.18.7 to versions.json
  v0.18.7
  [CHANGELOG] Prepare v0.18.7
  [ListItem] Fix triggers onTouchTap when disabled (mui#7486)
  [Popover] Scroll Container issue (mui#7472)
  [Table] Don't set height to tbody (mui#7484)
  docs: fix typo in Avatar readme (mui#7478)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: Popover The React component.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants