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

Fixes #168, scrollbutton glitch, tests added #169

Open
wants to merge 15 commits into
base: master
Choose a base branch
from

Conversation

felvhage
Copy link

@felvhage felvhage commented Jun 2, 2016

This fixes #168. When using Browser-Zoom scrollLeft can be a fractional number. Using Math.ceil on scrollLeft ensures that the condition will be met properly.

This fixes PolymerElements#168. When using Browser-Zoom scrollLeft can be a decimal number. Using Math.ceil on scrollLeft will ensure that the condition will be met in this case and the rightHidden will be set properly.
scrollable test-page
@googlebot
Copy link

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed, please reply here (e.g. I signed it!) and we'll verify. Thanks.


  • If you've already signed a CLA, it's possible we don't have your GitHub username or you're using a different email address. Check your existing CLA data and verify that your email is set on your git commits.
  • If you signed the CLA as a corporation, please let us know the company's name.

@googlebot
Copy link

CLAs look good, thanks!

@googlebot googlebot added cla: yes and removed cla: no labels Jun 2, 2016
@felvhage
Copy link
Author

felvhage commented Jun 3, 2016

I fixed the tests, so they work in shady & shadow dom-mode. I have tested Chrome, IE11 and Firefox locally.
The Travis CI build however, is still not happy with me. I read something is wrong in Firefox (?), but i cannot reproduce the problem locally.


});

suite('zoomed, scrollable paper-tabs', function() {
Copy link
Contributor

Choose a reason for hiding this comment

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

This needs to be wrapped in something like

if (Object.keys(document.createElement('div').style).indexOf('zoom') >= 0) {

so that it doesn't attempt these if the browser doesn't support zoom.

Copy link
Contributor

Choose a reason for hiding this comment

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

reminder :)

@bicknellr
Copy link
Contributor

LGTM, except for the comment I left about testing if zoom is supported. Also, I think you've won the test-to-code ratio award for this PR!

@felvhage
Copy link
Author

felvhage commented Jun 9, 2016

Thank you. You just gave me the motivation, to try some more stuff out ;-)

@bicknellr
Copy link
Contributor

I meant that the test suite itself should be wrapped. You don't actually need to remove them but, if the browser doesn't support the zoom property in the first place, they should probably be ignored since the tests rely on it. Put another way, isn't the 'zoomed, scrollable paper-tabs' suite now the same as one of the tests in the first suite?

@felvhage
Copy link
Author

Yes, the test is now the same, as the other ones. I'm trying to exclude piece, by piece to track down the problem, because i cannot reproduce it locally. Currently, there is no use of the zoom-property at all. Perhaps there is some structural problem. I'll try some more.

@bicknellr
Copy link
Contributor

Oh! This isn't a problem with your code: Firefox and our test setup aren't playing well together right now. Don't worry about making the Firefox CI tests work. Until we get the underlying issue resolved, it's fine as long as it passes locally.

@felvhage
Copy link
Author

Yes, that would have been my final conclusion aswell. I'll put it back together then. :-)

@felvhage
Copy link
Author

Should be back to where i started again.

@bicknellr
Copy link
Contributor

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.

Right Scrollbutton does not work correctly when using Zoom
3 participants