JohnMcLear / ep_page_view

Etherpad Page View plugin
https://npmjs.org/package/ep_page_view
14 stars 17 forks source link

Page break doesn't reflow when removing the top line with backspace #14

Closed simong closed 9 years ago

simong commented 10 years ago

We're seeing some strange reflowing behaviour when removing the first line after a page break (with backspace if it matters).

In the screencast you can see that the page break is removed, but it should just move the page break lower right? http://screencast.com/t/mgYOInoois1

JohnMcLear commented 10 years ago

Please provide exact steps to replicate.

simong commented 10 years ago

In recreating the steps I found a couple of issues. In all cases start with this:

  1. Create a pad
  2. Generate a lot of lines until you end up with a pagebreak. Example 1

Issue 1

  1. Assuming your caret is on the "Six"-line. Move your caret up by pushing the up arrow (ie: go up a few lines)
  2. When you move from the "One"-line to "Some text" you'll notice the page break disappears

Issue 2:

  1. Assuming your caret is at the beginning of the "One"-line.
  2. Hit backspace
  3. The page break is removed. I would expect that the "One" line would move to the previous page and the "Two" line would now be the top of the second page Example of bad behaviour: Example of bad behaviour Desired behaviour: Desired behaviour

There is a general issue around new lines being inserted as well when a pagebreak is removed, but I haven't found a good way to reproduce it a 100%.

JohnMcLear commented 9 years ago

Confirmed. A bounty would help me fix this sooner :)

JohnMcLear commented 9 years ago

Done https://github.com/ether/ep_page_view/commit/a9100e338295471717255a8cd761c808292c9ec6