API > @blocksuite/blocks > findClosestBlockElement
Function: findClosestBlockElement ​
findClosestBlockElement(
container
,point
,selector
):null
|Element
Find the most close block on the given position
Parameters ​
Parameter | Type | Description |
---|---|---|
container | BlockComponentElement | container which the blocks can be found inside |
point | Point | position |
selector | string | - |
Returns ​
null
| Element
Defined In ​
packages/blocks/src/_common/utils/query.ts:575