W3C home > Mailing lists > Public > public-css-archive@w3.org > October 2017

Re: [csswg-drafts] [cssom-view] Add notIfViewed to ScrollIntoViewOptions; add FocusScrollOptions

From: Florian Rivoal via GitHub <sysbot+gh@w3.org>
Date: Wed, 18 Oct 2017 03:27:58 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-337450078-1508297277-sysbot+gh@w3.org>
@zcorpan 
>I think that wouldn't help particularly.

Would it not?

* `elm.focus({scrollMode: "if-hidden", threshold: 0 });` would trigger scrolling if even 1 pixel of elm is hidden
* `elm.focus({scrollMode: "if-hidden", threshold: 1 });` would trigger scrolling only if the whole elm is hidden
* `elm.focus({scrollMode: "if-hidden", threshold: 0.5 });` would trigger scrolling if the half or more of elm is hidden

That seems to work, and to cover @jihyerish 's use case just fine (as well as intermediate situations through values other than 0 or 1).

>  At least it wouldn't help to achieve different alignment between partially in view and hidden, like in Chrome for focus().

Fair enough, but neither do the other proposals discussed so far, and that didn't seem blocking.



-- 
GitHub Notification of comment by frivoal
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/pull/1805#issuecomment-337450078 using your GitHub account
Received on Wednesday, 18 October 2017 03:28:01 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 06:41:19 UTC