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

@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