content-holding <div> should only contain the page text
OpenPublic

Description

Author: a.d.bergi

Description:
The new bidirectionality-improving div should only contain the parsed page content, nothing else. This is perfect when viewing articles, and helps scripts a lot when extracting that content.

But I think it is only needed for article views. For example in diff mode, it contains
<form id="mw-fr-reviewform">
<div id="mw-fr-diff-headeritems">
<table class="diff">
<hr class="diff-hr"/>
<h2 class="diff-currentversion-title">
...and then the real content

Also, in edit mode the <div id="mw-content-text"> contains
<div id="editnotice-ns-0"/>
<div id="mw-edit-longpage-hint">
<div id="wikiPreview" class="ontop" style="display: none;"/>
<form id="editform">
None of them is really content-text, I suspect. I think it would be better to have the div only appear (maybe empty) in the #wikiPreviw.

Also, it for example broke my script which tried to
document.getElementById("bodyContent").insertBefore(newElement, document.getElementById("editform"));


Version: unspecified
Severity: normal

bzimport added a project: MediaWiki-Interface.Via ConduitNov 22 2014, 12:10 AM
bzimport added a subscriber: wikibugs-l.
bzimport set Reference to bz35247.
bzimport created this task.Via LegacyMar 15 2012, 6:56 PM
Krinkle added a comment.Via ConduitMar 19 2012, 1:56 PM

(In reply to comment #0)

Also, it for example broke my script which tried to

document.getElementById("bodyContent").insertBefore(newElement,

document.getElementById("editform"));

Please elaborate what you mean here.

bzimport added a comment.Via ConduitMar 19 2012, 2:17 PM

a.d.bergi wrote:

> Also, it for example broke my script which tried to
> document.getElementById("bodyContent").insertBefore(newElement,
> document.getElementById("editform"));

Please elaborate what you mean here.

I have a script that inserted some edit tools into #bodyContent, right before #editform. Since r111647 that doesn't work, as #editform now is a child of #mw-content-text.

OK, it was a minor issue and very easy to fix. I only wanted to mention that some tools may be broken that make assumptions about the child nodes of mw.util.$content, which might be quite common.

Add Comment