restore and document scrolling behavior
Closes PR 11583, and everts the previous fix for PR 10853 and fixes it in a different way original commit: b0095111d4816043891138c3d36568d220c2db4a
This commit is contained in:
parent
b40699d86f
commit
2a0b73842d
|
@ -1131,17 +1131,17 @@
|
|||
|
||||
(define/public (do-scroll-to localx localy w h refresh? bias prev? next? only-focus?)
|
||||
(and canvas
|
||||
(or (and (or (send canvas is-focus-on?)
|
||||
(not only-focus?))
|
||||
(list (send canvas scroll-to localx localy w h refresh? bias)))
|
||||
(and (not (send canvas is-focus-on?))
|
||||
(or (and (not (send canvas is-focus-on?))
|
||||
(or
|
||||
(and prev?
|
||||
prevadmin
|
||||
(send prevadmin do-scroll-to localx localy w h refresh? bias #t #f #t))
|
||||
(and next?
|
||||
nextadmin
|
||||
(send nextadmin do-scroll-to localx localy w h refresh? bias #f #t #t)))))))
|
||||
(send nextadmin do-scroll-to localx localy w h refresh? bias #f #t #t))))
|
||||
(and (or (not only-focus?)
|
||||
(send canvas is-focus-on?))
|
||||
(list (send canvas scroll-to localx localy w h refresh? bias))))))
|
||||
|
||||
(def/override (grab-caret [(symbol-in immediate display global) dist])
|
||||
(when canvas
|
||||
|
|
|
@ -273,8 +273,12 @@ The @scheme[bias] argument is one of:
|
|||
The return value is @scheme[#t] if the @techlink{display} is scrolled,
|
||||
@scheme[#f] if not (either because the requested region is already
|
||||
visible, because the @techlink{display} has zero size, or because the
|
||||
editor is currently printing.)
|
||||
editor is currently printing).
|
||||
|
||||
If an editor has multiple @techlink{displays}, then if any display
|
||||
currently has the keyboard focus, it is scrolled. Otherwise, the
|
||||
``primary owner'' of the editor (see @method[editor-canvas%
|
||||
call-as-primary-owner]) is scrolled.
|
||||
|
||||
}
|
||||
@methimpl{
|
||||
|
|
Loading…
Reference in New Issue
Block a user