https://bugzilla.wikimedia.org/show_bug.cgi?id=41911

       Web browser: ---
             Bug #: 41911
           Summary: WikiEditor scrolls textbox to the first line and
                    removes focus
           Product: MediaWiki extensions
           Version: unspecified
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: javascript
          Severity: normal
          Priority: Unprioritized
         Component: WikiEditor
        AssignedTo: [email protected]
        ReportedBy: [email protected]
                CC: [email protected], [email protected]
    Classification: Unclassified
   Mobile Platform: ---


mediawiki.action.edit tries hard to preserve the scrollTop property of the
textbox after submitting the form for preview, but WikiEditor seems to try to
prevent that.

Steps to reproduce:
1. Open a long article for editing, scroll down a bit.
2. Hit preview (make sure you don't use LivePreview).
3. When your computer is slow enough, focus the textarea before WikiEditor
loads.
4. Wait for WikiEditor to initialize.

Expected result:
The text is scrolled down a bit (as you left it before the preview), the focus
is still in the textarea (if you focused it in step 3).

Actual result:
The text starts at the beginning, the focus is lost.

This happens in jquery.wikiEditor.js in line 502: $textarea.wrapAll() seems to
reset the scrollTop property of the textbox as well as it removes the focus, at
least in Firefox and Internet Explorer.

The scrollTop property and the fact that the textarea is focused should be
saved before the WikiEditor structure is built in the DOM and restored
afterwards.

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
You are on the CC list for the bug.

_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to