Problems with placing code sources next to headings

Bug #101693 reported by Guido Wesdorp
14
Affects Status Importance Assigned to Milestone
Silva
Fix Released
Medium
Unassigned

Bug Description

When adding a code source to (presumably!) a heading (if not, please test with
table cell and list item too), the code source copied outside of the element,
but the remnants are not removed properly from the original location. This makes
that part of the code source div representation is left in place.

Found in Silva 1.4 (current branch), not tested with other versions.

Tags: kupu silva-1.6
Revision history for this message
Flynt (flyntle) wrote :

We have serious and strange problems with codesources in Silva-1.5.6.

Can it be, that they are connected with this issue?

Revision history for this message
Flynt (flyntle) wrote :

> Can it be, that they are connected with this issue?

Meaning:
Do johnny's observation hold for later versions of Silva too?

Revision history for this message
Kit Blake (kitblake) wrote :

No, this is a problem with cursor placement, where if you place the cursor in a
heading, and try to add an external source, *'in'* the heading, Kupu doesn't
know what to do. It does it's best and retains the text that it understands. The
text is saved as a heading, and the rest of the unknown stuff is tossed, which
means that the code source is gone.

Revision history for this message
Eric Casteleijn (thisfred) wrote :

Jasper, could you have a look at whether this is still happening in 1.5?

Revision history for this message
Jasper Op de Coul (jasper-infrae) wrote :

This behaviour is still happening in the (1.6) trunk.
I changed the kupu code, so it is no longer possible to add code sources inside
headers or table cells. An alert box with some explenation is shown to give
feedback to users.

Since it's a kupu issue, it's hard to fix this in the 1.5 branch.

Revision history for this message
Kit Blake (kitblake) wrote :

Removing the 1.5 topic. If we need to backport Kupu, we'll do so, but not in
this release.

Revision history for this message
Wim Boucquaert (wim-boucquaert) wrote :

adding the topic to kupu and works fine in 1.6

Revision history for this message
Kit Blake (kitblake) wrote :

This was fixed but there's a problem. When you want to edit an existing Code Source in Kupu, you click it. If you happen to click the heading of the Code Source, which happens to be an h4 inside the div, then your cursor is 'in the heading'. You can edit it , but when you save you get the js alert "A Code Source cannot be inserted into a heading."

Note: the message that appears actually says 'header' when it should say 'heading'.

Changed in silva:
status: Fix Released → In Progress
Changed in silva:
assignee: jasper-infrae → aaltepet
Revision history for this message
Andy Altepeter (aaltepet) wrote :

I actually fixed Kit's last comment, unable to update an external source in a document if you click in it's heading, a few months ago, so marking this as "fix committed".

Changed in silva:
milestone: none → 2.1
status: In Progress → Fix Committed
Changed in silva:
assignee: aaltepet → nobody
Changed in silva:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.