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:
Matthew Flatt 2011-01-05 06:59:02 -07:00
parent b40699d86f
commit 2a0b73842d
2 changed files with 10 additions and 6 deletions

View File

@ -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

View File

@ -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{