You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ATM there's no way to obtain all DOM Range rects e.g. when the range spans multiple lines of text using the Rect class. While it's possible to iterate over the list returned by domRange.getClientRects() and create a new Rect instance from each rect, such approach does not cover very specific cases which are already handled by the Rect helper class e.g. when there's no rect (Safari) etc..
So to use the smart logic of the Rect class and avoid code duplication, a static method is required. The very first use case is in https://github.com/ckeditor/ckeditor5-ui/issues/263, where depending on the direction of the seleciton, a proper DOM Range rect must be returned (either the first or the last one). Without the smart Rect logic, ContextualToolbar fails to show when the selection is collapsed in Safari and in other edge cases.
The text was updated successfully, but these errors were encountered:
ATM there's no way to obtain all DOM Range rects e.g. when the range spans multiple lines of text using the
Rect
class. While it's possible to iterate over the list returned bydomRange.getClientRects()
and create a newRect
instance from each rect, such approach does not cover very specific cases which are already handled by theRect
helper class e.g. when there's no rect (Safari) etc..So to use the smart logic of the
Rect
class and avoid code duplication, a static method is required. The very first use case is in https://github.com/ckeditor/ckeditor5-ui/issues/263, where depending on the direction of the seleciton, a proper DOM Range rect must be returned (either the first or the last one). Without the smartRect
logic,ContextualToolbar
fails to show when the selection is collapsed in Safari and in other edge cases.The text was updated successfully, but these errors were encountered: