Skip to content
This repository has been archived by the owner on Aug 29, 2023. It is now read-only.

select: default scroll position incorrect when using md-select-header #10561

Open
bunjiboys opened this issue Apr 3, 2017 · 5 comments
Open
Labels
P4: minor Minor issues. May not be fixed without community contributions. severity: inconvenient type: bug ux: integration ux: polish
Milestone

Comments

@bunjiboys
Copy link

Actual Behavior:

  • What is the issue? *
    When opening the mdSelect drop down, the list is scrolled past the mdSelectHeader which effectively hides it, when the list is long enough to start scrolling
  • What is the expected behavior?
    The mdSelectHeader should be at the top of the drop down panel

CodePen (or steps to reproduce the issue): *

AngularJS Versions: *

  • AngularJS Version:
    1.5.11
  • AngularJS Material Version:
    1.1.3

Additional Information:

  • Browser Type: *
    Google Chrome
  • `Browser Version: *
Google Chrome	56.0.2924.87 (Official Build) (64-bit)
Revision	0e9a9a6f3676ae439b78cd9b3f62b4193c3ac7d5-refs/branch-heads/2924@{#895}
OS	Mac OS X 
JavaScript	V8 5.6.326.50
  • OS: *
    macOS Sierra 10.12.3 (16D32)
  • Stack Traces:
    N/A

Shortcut to create a new CodePen Demo.
Note: * indicates required information. Without this information, your issue may be auto-closed.

Do not modify the titles or questions. Simply add your responses to the ends of the questions.
Add more lines if needed.

@markwpiper
Copy link

+1

It's possible to work around this by setting the .scrollTop of the md-content inside the md-select-menu, on a delay triggered by md-on-open.

Coffeescript workaround:

scope.onOpen = ()->
  opened = false
  scrollSelectHeaderInView = ->
    el = $("md-select-menu md-content._md")
    if !opened && el.length > 0
      opened = true
      el[0].scrollTop = 0
  $interval(scrollSelectHeaderInView, 40, 10, false)
  opened

@alonetech
Copy link

alonetech commented Jan 29, 2018

for ios put the below css :

md-select-menu md-content {
    -webkit-overflow-scrolling: auto !important;
}

@Splaktar
Copy link
Member

This is reproducible with AngularJS Material 1.1.7 and AngularJS 1.6.7 as well.

@Splaktar Splaktar added this to the 1.1.8 milestone Feb 11, 2018
@Splaktar Splaktar modified the milestones: 1.1.8, 1.1.9 Mar 16, 2018
@Splaktar Splaktar modified the milestones: 1.1.9, 1.1.10 Apr 19, 2018
@Splaktar Splaktar modified the milestones: 1.1.10, 1.1.11 Jun 19, 2018
@Splaktar Splaktar modified the milestones: 1.1.11, 1.1.12 Sep 10, 2018
@Splaktar Splaktar changed the title mdSelect: Default scroll position incorrect when using md-select-header select: default scroll position incorrect when using md-select-header Oct 30, 2018
@Splaktar
Copy link
Member

@srikanthdarmapuri please 👍 the OP so that we can sort by popular issue reactions. Please refrain from adding +1 comments to issues.

@rishabh19991
Copy link

I also faced the same issue, and here is my workaround using jQuery
$('md-select-menu md-content._md').scrollTop(-10);

Waiting for some proper solution.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
P4: minor Minor issues. May not be fixed without community contributions. severity: inconvenient type: bug ux: integration ux: polish
Projects
None yet
Development

No branches or pull requests

5 participants