[wp-trac] [WordPress Trac] #29338: Awkward jump when clicking text tab after scrolling visual editor
WordPress Trac
noreply at wordpress.org
Tue Sep 2 17:53:03 UTC 2014
#29338: Awkward jump when clicking text tab after scrolling visual editor
--------------------------+------------------------------
Reporter: gcorne | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Editor | Version: trunk
Severity: normal | Resolution:
Keywords: | Focuses: ui
--------------------------+------------------------------
Comment (by stephdau):
1. Switching from the visual editor to the text editor triggers
`textEditorResize()`.
1. The text editor is never as tall as the visual one, with the same
content, since same but unstyled.
1. We resize the editor to be the height of the non-WYSIWYG text content
(see editor status bar moving up.
1. But we don't (or fail to) recalculate where the top/bottom of the
pinned sidebar should be in relation to the current editor's size (I
think).
EG: switching `hiddenHeight ` for `textEditorHeight ` at
https://core.trac.wordpress.org/browser/trunk/src/wp-admin/js/editor-
expand.js?rev=29656#L144 stops the Awkward jump from happening, but the
text editor ends with a slew of whitespace at its bottom that the user
cannot access (totally a height equal to the discrepancy between the
visual and text editors heights). So not quite a solution.
Another hack to "make the problem go away) is to force a scrollTop(0) when
switching to the text editor (aka, in `mceHide()`), which recalculates the
editor and sidebar positions, and make the issue moot. Still not great.
Still currently at a loss for an actual fix. :)
--
Ticket URL: <https://core.trac.wordpress.org/ticket/29338#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list