[wp-trac] [WordPress Trac] #28328: Focus on editing, while editing
WordPress Trac
noreply at wordpress.org
Thu Aug 14 20:25:57 UTC 2014
#28328: Focus on editing, while editing
-------------------------+-------------------------------------------------
Reporter: markjaquith | Owner:
Type: task | Status: new
(blessed) | Milestone: 4.0
Priority: high | Version:
Component: Editor | Resolution:
Severity: critical | Focuses: ui, accessibility, javascript,
Keywords: has-patch | administration
needs-testing |
-------------------------+-------------------------------------------------
Comment (by stephdau):
Replying to [comment:77 azaozz]:
> > ...make the sidebar scroll only proportionately to how tall it is
compared to the viewport
> Yeah, was looking at that/testing but couldn't get it to work well. Will
give it another try. Any ideas on how to get that working well are very
welcome :)
I'll be frank, it's above my math-paygrade. ;)
But the way I understand it: if I scroll 1/3 of the way down in the
document, the sidebar should only scroll 1/3 of the way down inside the
vieport.
So say:
{{{
$sidebarHeight = 1000;
$documentHeight = 1100;
$viewportHeight = 600;
$sidebarTop = 0; // top, which it's not IRL but bear with me
$windowPos = [current position];
onscroll:
$sidebarTop = abs( $viewportHeight / abs( $documentHeight / $windowPos )
);
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/28328#comment:78>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list