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

Here is my recommendation on how to best proceed.

What we should focus on right now:

* Add only `preventScroll` to `focus()` (without `scrollOptions`), and try to get that adopted cross-browser. This should be an easier sell than the whole package sans consensus. See https://extensiblewebmanifesto.org/
* Develop a JS library that uses the primitives `preventScroll: true` + IntersectionObserver + `scrollIntoView()` to expose a convenient API for web developers.
* Ask browser vendors to consider if they want to get [full interoperability](https://docs.google.com/document/d/1LSuLWJDP02rlC9bOlidL6DzBV5kSkV5bW5Pled8HGC8/edit#heading=h.y7jw138np12j) on default scrolling behavior for `focus()`, and if so what the behavior should be. I can file issues.

What we can do later:

* When `preventScroll` is shipped and JS libraries exist to use it, study how these features are actually being used on the web, to inform what the for-convenience API should handle and how.
* If/when `focus()` default scrolling behavior is more interoperable, we have a stable foundation to extend the API with `scrollOptions` (or something) that can explain the default scrolling behavior and allow customizing alignment etc.



-- 
GitHub Notification of comment by zcorpan
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/pull/1805#issuecomment-337801758 using your GitHub account

Received on Thursday, 19 October 2017 05:15:51 UTC