Camille Bégnis wrote:

there is a long standing behavior that is disturbing: when you double click a 
text node to replace it, in some contexts the entered text goes to the previous 
text node.
See use case below.


Goal :
Before  After
<?xml version="1.0"?>
<db:glossentry>
  <db:glossterm>V</db:glossterm>
  <db:glossdef>
     <db:para xml:lang="en">Verify</db:para>
     <db:para xml:lang="fr">Vérification</db:para>
  </db:glossdef>
</db:glossentry>
        <?xml version="1.0"?>
<db:glossentry>
  <db:glossterm>V</db:glossterm>
  <db:glossdef>
     <db:para xml:lang="en">Notification</db:para>
     <db:para xml:lang="fr">Vérification</db:para>
  </db:glossdef>
</db:glossentry>

I double click on "Verifiy" :

I start typing ""Notification" :
<para> is empty and closed… and it's difficult to go backward without undo.

Configuration : Chrome Version 30.0.1599.101 m and Java Version 7 Update 45


xmleditor-support@xmlmind.com first answered:
What you describe is not only an annoying behavior, but also a bug. You should never, 
ever, get a completely empty (i.e. not text node), collapsed <para>.


However we didn't manage to reproduce this bug with the styled view[*]. See 
attached screenshots.


We'll try to fix this bug or at least, make it less annoying. However, I cannot 
give my word that we'll succeed.

I've tried to fix this bug this evening.

Since your above XML snippet looks very much like DocBook, I've tried to reproduce the issue with both a DocBook 5 and a DocBook 4 <glossary> element, with both the styled view and the tree view (just like your screenshots).

I've never managed to reproduce the problem with a DocBook 5 or a DocBook 4 document!

The only way I've found to reproduce it easily is open a document which does not conform to any DTD or schema (just like your XML snippet: <db:glossentry>, but no <!DOCTYPE>, no DocBook 5 namespace; moreover glossentry is not a root element allowed by DocBook 5).

However, in such case, XMLmind XML Editor is somewhat correct when it removes the text node from the <db:para> after you double-click on "Verify" and then type "Not".

-->When there is no DTD or schema in use, there is nothing which indicates to XMLmind XML Editor that a <db:para> is expected to contain a text node.<--

Hence the very annoying behavior you have described.

In summary, there is no bug which could be fixed here. If you want to avoid this annoying behavior, simply make sure that XMLmind XML Editor always associates a DTD or schema to the document you are editing.


--
XMLmind XML Editor Support List
xmleditor-support@xmlmind.com
http://www.xmlmind.com/mailman/listinfo/xmleditor-support

Reply via email to