Skip to content

MatRipple.launch() coordinates are relative to viewport and not host element, contradicting the documentation. #16613

@simon-mathewson

Description

@simon-mathewson

Documentation Feedback

The description for MatRipple.launch() is as follows:

Launches a manual ripple at the specified coordinates within the element.

However, the coordinates passed are interpreted as relative to the viewport, as demonstrated here. It took me a long time to figure this out, but of course this behavior is intuitive, since in most cases you just pass coordinates from a mouse click event.

Suggested replacement:

Launches a manual ripple at the specified coordinates relative to the viewport.

Affected documentation page: https://material.angular.io/components/ripple/api

Metadata

Metadata

Assignees

Labels

P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgentarea: material/coredocsThis issue is related to documentation

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions