mangalam-research / wed

Wed is a web-based editor that assists users in editing XML documents according to a schema.
http://mangalam-research.github.io/wed/
Mozilla Public License 2.0
24 stars 10 forks source link

clicking on an error message link in the "Errors" pane scrolls the editing pane to an incorrect position. #16

Closed lddubeau closed 10 years ago

lddubeau commented 10 years ago

Versions

Wed: v0.12.2-5-gc306b43 Chrome: 33.0.1750.152

Steps to Reproduce

  1. Open the kitchen sink with sketch_for_a_medical_education.xml.
  2. Decrease the label visibility (Ctrl-[).
  3. Delete the first title element in the file.
  4. In the "Errors" pane click on the last error.

    Expected Results

The editing pane should scroll so that the marker corresponding to the error is completely visible.

Actual Results

The editing pane scrolls so that the marker is just above the visible portion of the editing pane.

Observations

The issue cannot be reproduced in Firefox or IE. It can be reproduce in Chrome as far back as version 26.

The issue seems to have to do with the fact that the marker is an empty element. Chrome seems to treat the border as having no existence. It furthermore seems that subsequent siblings somehow lend substance to the empty error marker. In the test above, clicking on the first error in the "Errors" pane will bring the first error marker into view as expected. When element labels are visible the issue does not occur at all probably due to the presence of a label after the last error.

The solution is to make the error markers be inline-block elements with an   in them.

lddubeau commented 10 years ago

Oops... this was closed with the release of 0.13.0.