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

       Web browser: ---
            Bug ID: 54335
           Summary: VisualEditor: Surface isn't updated properly for
                    Language annotations
           Product: VisualEditor
           Version: unspecified
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: Unprioritized
         Component: Editing Tools
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected],
                    [email protected]
    Classification: Unclassified
   Mobile Platform: ---

This is extremely weird, and is relatively new, and I am at a loss.

Steps to reproduce:
1. Put cursor on some word in the article.
2. Select "More -> Language" in the toolbar
3. Click "Change Language" button in the widget
4. Choose any other language (for example, "Hebrew")
5. Close the inspector by clicking anywhere else.
6. Notice: The word is surrounded with a language span, but it has the initial
en/ltr values instead of the chosen annotation.
7. Save the article.
8. Click on "Edit Source" --> the language span contains the *correct*
annotation (he/rtl)

Expansion on that:
1. Repeat the above through step 6.
2. Select a separate word and annotate it with some random link.
3. Inspect the original language span -- *now* it's updated!

One more weirdness:
1. Repeat above through step 6.
2. Put the cursor back on that annotation, and open the inspector
3. Observe: While the surface shows the span as en/ltr, the inspector widget
shows the correct annotation (hebrew/rtl)

This happens in master and in the live mediawiki.org version.



I've spent a while tracking what is wrong with the annotations, and they seem
to be correct in the inspector itself. In the "onClose", the annotation is the
correct he/rtl one, being then sent to AnnotationInspector onClose, and then to
the SurfaceFragment for execution in the fragment.annotateContent( 'set',
annotation )

That annotation (the final one that's sent to the fragment) is the *correct*
annotation. And yet, somewhere along the way the update stops. 

I tried stepping into the code inside ve.ce.Surface onChange and the annotation
remains the correct one. It then continues to ve.dm.Surface 'change' method
where the annotation is still the correct one (he/rtl) 

And yet somewhere it doesn't update the surface.

Link Inspector seems to work properly, though, and both link and language
inspector rely on AnnotationInspector, which makes me think there is an issue
with Language specifically, or that perhaps something has changed with the
definition that needs to be updated in the Language inspector.

I'm not sure if the problem is in the Language Inspector (though that seems a
bit odd, since the annotation remains correct throughout) or somewhere in the
process of updating (and that seems weird too since *links* are working fine).

I'm at a loss. Help is appreciated!

-- 
You are receiving this mail because:
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