Last modified: 2013-06-21 18:46:46 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T50605, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 48605 - VisualEditor: Empty annotations are dropped
VisualEditor: Empty annotations are dropped
Status: RESOLVED FIXED
Product: VisualEditor
Classification: Unclassified
Data Model (Other open bugs)
unspecified
All All
: Normal normal
: VE-deploy-2013-06-27
Assigned To: Ed Sanders
:
Depends on:
Blocks: 48426
  Show dependency treegraph
 
Reported: 2013-05-18 16:58 UTC by Roan Kattouw
Modified: 2013-06-21 18:46 UTC (History)
3 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Roan Kattouw 2013-05-18 16:58:43 UTC
VE drops things like <i></i>, which Parsoid sometimes uses to preserve strange things.

I think a solution might be to store this as an inline node or as a meta item.
Comment 1 Ed Sanders 2013-05-19 16:21:43 UTC
Should the inline node disappear if saved next to similarly annotated text,

e.g.
'<i><emptyAnnotation /></i><i>Foo</i>' => '<i>Foo</i>'

or more complex:

'<i><emptyAnnotation /></i><b><i>Foo</i></b>' => '<i><emptyAnnotation /><b>Foo</b></i>'
?
Comment 2 James Forrester 2013-05-22 18:40:22 UTC
(In reply to comment #1)
> Should the inline node disappear if saved next to similarly annotated text,
> 
> e.g.
> '<i><emptyAnnotation /></i><i>Foo</i>' => '<i>Foo</i>'
> 
> or more complex:
> 
> '<i><emptyAnnotation /></i><b><i>Foo</i></b>' => '<i><emptyAnnotation
> /><b>Foo</b></i>'
> ?

I believe the latter, but Roan was going to answer this.
Comment 3 Ed Sanders 2013-05-24 18:24:07 UTC
(Actually it's a yes/no question, both cases relate to the same behaviour.)
Comment 4 Roan Kattouw 2013-06-03 22:25:23 UTC
That would be nice, yes, but I don't think it's critically important.
Comment 5 Gerrit Notification Bot 2013-06-12 18:42:02 UTC
Related URL: https://gerrit.wikimedia.org/r/68213 (Gerrit Change I0f3a194f629b054f193a61af105733a555775d79)
Comment 6 Ed Sanders 2013-06-12 18:45:12 UTC
Above change fixes issue with annotations being dropped, but we still need to fix empty annotations not rendering (e.g. <span style="display: block; background: red; width: 100px; height: 100px;"></span>), either here or in a new bug.
Comment 7 James Forrester 2013-06-12 19:25:18 UTC
Split new items out to bug 49497; closing this one.
Comment 8 Roan Kattouw 2013-06-18 19:03:11 UTC
This works for single annotations, but not for nested ones. See https://gerrit.wikimedia.org/r/#/c/69343/ for a failing test case.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links