-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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
Weird ripple effect #972
Comments
@BenevidesLecontes can you reproduce the issue in a pluker or similar? I don't follow on your steps to reproduce. |
@jelbourn git escaping the html, i update with what i'm using to make this ripple showing like this. And i'll try to make the plunker work with rc5, after that i'll try to update with plunker. |
cc @dozingcat |
md-button uses the ripple effect by default; you don't need to (and shouldn't) add a md-ripple attribute. You can set the disableRipple property to true to disable the ripple. |
@dozingcat but if i don't use the attribute md-ripple i can't change the ripple color, i need to disable it and then use the atribute to set the color? |
@jelbourn @dozingcat also md-ripple is creating scroll on my page after several clicks. I think this the cause. |
If you get the Plunker set up I can take a look. There's currently not a supported way to change the ripple color on md-buttons. Disabling the existing ripple and adding your own might be a workaround, but that's not the intended use. |
@dozingcat any plunker with material alpha 7 and rc5 to fork? I Forked from here, but i can't make it work. |
+1 |
I think the folowing error is something related, after upgranding alpha.7 and angular rc.5 : Can't bind to 'md-ripple-trigger' since it isn't a known property of 'div'. ("*ngIf="isRippleEnabled()" class="md-button-ripple" [class.md-button-ripple-round]="isRoundButton()" [ERROR ->][md-ripple-trigger]="getHostElement()" [md-ripple-color]="isRoundButton() ? 'rgba(255, 255, 255, 0.2)"): MdButton@0:180 |
@fernandogomesdf I encountered this error as well, but it disappeared as soon as I import |
I have got the same problem. Each click of the bottom inserts a
Into my html, and it keeps stacking and never goes away. |
@dozingcat Here is a plunker with RC.5 and alpha.7 to demonstrate the issue. Just press the button a couple of times and you'll see the vertical scrollbar appears. As said by @colinfang above, every time you press the button those divs stack up. |
@dozingcat @ivoviz and also notice in this plunker, no ripple effect after all. |
The problem may be that the ripples depend on styles in core.css, which needs to be included in the page (for example https://github.com/angular/material2/blob/master/src/demo-app/index.html#L17 in the demo app). @jelbourn was there going to be a way to automatically include this? |
@dozingcat Indeed, I can confirm that adding core.css solves every problem, although it would be nice to have it automatically included somehow. (FYI: same thing happening when |
@ivoviz adding core.css solved the scroll problem? |
@BenevidesLecontes Yes it did for me. |
This Ripple effect doesn't seem reasonable, I can't even seen the effect on dark background. |
@colinfang thank you, it was my mistake |
Hi, I am experiencing the same issue in my angular 2 app and was wondering how I can get hold of the core.css file that @ivoviz claims will solve this issue? Alternatively, can anyone give me an ETA as to when this is officially likely to get fixed? Thanks in advance |
It is in |
|
Thanks both - that fixed my issue. BTW: I had also reported this at Google Groups - angular-material2 and have mentioned these work-arounds there as well. |
@jelbourn @sspilleman it doesn't work for me on alpha7-4. The issue persists even after loading those css files |
You should load the css files with a alpha.7-4 isn't all the way up to master; it only includes very minor changes that won't affect most users (in this case fixing an issue with |
@jelbourn thanks it works when loading globally with |
Also you can just disable ripple for a while <button md-mini-fab [disableRipple]="true">
<md-icon>add</md-icon>
</button> |
@jelbourn If you get the chance, please state briefly why you chose to put the styles in a separate CSS that we have to |
There are some styles that are used between multiple components (such as ripples), so including them directly in the component css instead of globally would lead to a pretty sizable chunk of duplicate payload. |
added workaround for weired ripple effect (angular/components#972)
Closing into #1139 |
Using rc5 and m2 alpha7-4, md-menu html like this:
showed like this after rendering:
include |
#### Breaking Changes - Upgraded to `RC6` - Upgrade material to `alpha.8-1` - Added `hammerjs` dependency for material. - Removed bootstrap and implemented everything with `NgModule` decorator. - Changed `TdLoadingDirective`'s creation to be sync so it can be accessed in the `ngAfterViewInit` hook. - Removed es6-shim and reflect-metadata and replaced with core-js library. (need to update angular-CLI, index.html and karma.conf.js) - removed `md-content` and added `.md-content` - Replaced Type with Type<any> - Need to add angular2-material `core.css` and `overlay.css` as a workaround for ripple and menu into index.html angular/components#972 #### Features - Added tooltip, slider, button-toggle and menu from angular-material. #### Bug Fixes - Changed code in animations since the angular classes used are no longer public and changed duration to 150ms so it doesnt look like its frozen in IE/Firefox (they dont support animations). - Fixed file-upload select/drop events for Firefox and IE. #### Internal - Restructured imports in `docs` to remove the majority of the index.ts files and less explicit declarations in `system-config.ts`. - Unit test `karma-test-shim` changes to set up test environment. - Removed all unit tests (gonna start from scratch with each one). - Unit tests changes to use `TestBed` and remove imports `describe`/`it`/`beforeEach` since they are taken as global. - Removed depricated code all over the platform.
Currently (angular 2.0, material 2.0.0-alpha.9) the solution is to include theme in styles.css like:
|
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Bug, feature request, or proposal:
[x] Bug
What is the expected behavior?
Expecting ripple effect on buttons
What is the current behavior?
On click ripple effect makes my button wide and ripple color appears like in image below
![screen shot 2016-08-09 at 17 36 47](https://cloud.githubusercontent.com/assets/1839361/17532698/36d3eeb8-5e58-11e6-8d3a-bf08c1a18a62.png)
#### What are the steps to reproduce?Providing a Plunker (or similar) is the best way to get the team to see your issue.
What is the use-case or motivation for changing an existing behavior?
Which versions of Angular, Material, OS, browsers are affected?
Angular material alpha.7, chrome 52.0.2743.116 (64-bit) MacOS Sierra
Is there anything else we should know?
I'm trying to use the ripple effects on buttons am I missing something? I have my imports like this:
The text was updated successfully, but these errors were encountered: