W3C home > Mailing lists > Public > public-css-archive@w3.org > November 2020

Re: [csswg-drafts] [cssom-view] Add ScrollIntoViewMode ("always", "if-needed"); add FocusScrollOptions (#5677)

From: hyojin via GitHub <sysbot+gh@w3.org>
Date: Wed, 18 Nov 2020 07:41:05 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-729497469-1605685264-sysbot+gh@w3.org>
> For focus() extensions, see whatwg/html#834 (comment)

In the thread(whatwg/html#834), there were requirements as follows:
* Disabling scrolling on focus()
-> Now, we can disable to scroll the element with `element.focus({preventScroll: true});`. (https://github.com/whatwg/html/pull/2787)
* Smooth scrolling on focus()
-> Now, we can smoothly scroll to the element by `element.focus()` with `scroll-behavior: smooth`.
* Alignment of scrolling on focus()
-> We can't do it for now. The default alignment is even different between Chrome(center) and Firefox(nearest).

If we have `FocusScrollOptions` for the last remaining requirement, I believe it could be used for several use cases.
(e.g. handle browser compatibility issue, avoid to use custom scroller, support several UX req.)

For the purpose, we could simply refer to [`scrollIntoviewOptions`](https://www.w3.org/TR/cssom-view-1/#dictdef-scrollintoviewoptions) with block and inline properties.

My proposal is:
Can we rename the dictionary from [`scrollIntoviewOptions`](https://www.w3.org/TR/cssom-view-1/#dictdef-scrollintoviewoptions) to `scrollAllignmentOptions' as more general term?
I referred Scroll Alignment term to https://scroll-into-view-if-needed.netlify.app/#scroll-alignment.
The renamed dictionary can be referred for the additional focus() extension in whatwg side.
It doesn't affect to web developers without any WebAPI change.

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


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Wednesday, 18 November 2020 07:41:07 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 06:42:22 UTC