|
|
@ -889,15 +889,10 @@ class RenderEditor extends RenderEditableContainerBox |
|
|
|
kMargin + |
|
|
|
kMargin + |
|
|
|
offsetInViewport; |
|
|
|
offsetInViewport; |
|
|
|
final caretBottom = endpoints.single.point.dy + kMargin + offsetInViewport; |
|
|
|
final caretBottom = endpoints.single.point.dy + kMargin + offsetInViewport; |
|
|
|
double dy; |
|
|
|
double dy = caretTop; |
|
|
|
if (caretTop < scrollOffset) { |
|
|
|
if (caretBottom > scrollOffset + viewportHeight) { |
|
|
|
dy = caretTop; |
|
|
|
|
|
|
|
} else if (caretBottom > scrollOffset + viewportHeight) { |
|
|
|
|
|
|
|
dy = caretBottom - viewportHeight; |
|
|
|
dy = caretBottom - viewportHeight; |
|
|
|
} |
|
|
|
} |
|
|
|
if (dy == null) { |
|
|
|
|
|
|
|
return null; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
return math.max(dy, 0.0); |
|
|
|
return math.max(dy, 0.0); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|