Page MenuHomePhabricator

VisualEditor: Span tags for Language tool only mark part of the page
Open, MediumPublic

Description

Intention:
Mark almost an entire page with language (en) and direction (LTR).

Steps to Reproduce:

  1. Open the page and select almost all of the content.
  1. Insert > Language
  1. Set the language to English and the direction to LTR.

Actual Results:
Only a small fraction of the page was marked with span tags. See https://office.wikimedia.org/w/index.php?diff=112247&oldid=112246

Expected Results:
I wanted this:

<span lang="en" dir="ltr">
Div box
Image
Text
Image
Some text
End of div box
Lots and lots and lots of text
</span>

I got this:

Div box
Image
<span lang="en" dir="ltr">Text</span>
Image
<span lang="en" dir="ltr">Text</span>Some te</span>xt
End of div box
Lots and lots and lots of text

Reproducible: Always

This was exactly repeatable on this page: the last span tag always ended in the middle of the same word.


Version: unspecified
Severity: normal
URL: https://office.wikimedia.org/w/index.php?diff=112247&oldid=112246

Details

Reference
bz65645

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 3:15 AM
bzimport set Reference to bz65645.

The language tool only covers text, not block content, so that's expected.

The not-getting-to-the-end-of-the-selection thing sounds like an odd data model bug.

When I've selected the whole page, I'd rather have the whole page marked with a single pair of tags, even if defining the block content as having a "language" is meaningless.

(In reply to WhatamIdoing from comment #2)

When I've selected the whole page, I'd rather have the whole page marked
with a single pair of tags, even if defining the block content as having a
"language" is meaningless.

Tough. That's not how HTML works. :-)