馃啎 Feature request
The current Document Editor demo should have a sticky toolbar, just like the Classic Editor. Without that, the editor is hardly usable.
If you'd like to see this feature implemented, add 馃憤 to this post.
cc @oleq?
I was wondering the same when implementing it but I decided this is a different use鈥揷ase.
A document editor should be similar to the native word processors: It's the document (page) area that should scroll, but never the toolbar (or page). That's why the toolbar should remain static and the demo we have ATM on our website is... wrong.
OTOH... I see nothing wrong with using the sticky toolbar in this situation. I mean: it won't break anything. It's just about the complexity of the code.
It's just about the complexity of the code.
What if we use position:sticky?
No IE11, that's for sure. But this is not an issue. I'm not also sure what this boundary situation would look like with the native pos: sticky:

We make sure the toolbar won't cover the last 1-2 LOC. Is the native pos: sticky capable of such thing?
A document editor should be similar to the native word processors: It's the document (page) area that should scroll, but never the toolbar (or page). That's why the toolbar should remain static and the demo we have ATM on our website is... wrong.
I agree with you, @oleq. I have hacked the demo a bit and got the following, which I believe should be the right demo:

We make sure the toolbar won't cover the last 1-2 LOC. Is the native pos: sticky capable of such thing?
Another thing: I was unable to use the viewportTopOffset with pos: sticky. Setting top: 123px always moves the element, not only when it's sticky.
Another thing: I was unable to use the viewportTopOffset with pos: sticky. Setting top: 123px always moves the element, not only when it's sticky.
I don't understand how viewportTopOffset is related to pos:sticky. The former is our JS implementation and is not available (?) in the decoupled editor. The latter is CSS.
Our sticky toolbar implementation offers viewportTopOffset. We use it everywhere (demos, docs...).
My point was that if we decide to switch to the native position: sticky, we're losing this feature.
Being this a demo issue, I believe @m-kr is the one to call for action ;)
My point was that if we decide to switch to the native position: sticky, we're losing this feature.
Do we? What about position: sticky; top: 33px? Doesn't it have the same behaviour?
Do we? What about position: sticky; top: 33px? Doesn't it have the same behaviour?
This solution with the scrollable editable area is the best, I can implement it without any hacks and, as @oleq wrote, it looks like Word 馃憤
I don't agree with this at all. You are forcing the document editor into full screen only. You can't possible think that is the only use case that will ever happen with it... not everyone wants to throw out all their layout just to show an editor.
Also as for viewportTopOffset, we require it. But why can't it simply be a margin?
Most helpful comment
I agree with you, @oleq. I have hacked the demo a bit and got the following, which I believe should be the right demo: