statamic / v2-hub

Statamic 2 - Feature Requests and Bug Reports
https://statamic.com
95 stars 5 forks source link

Trying to delete last empty space after a non text block at end of bard field causes browser to go back to previous page #1743

Closed beckysoll closed 6 years ago

beckysoll commented 6 years ago

Expected behaviour

I'd assume trying to delete an empty space would simply delete that empty space

Actual behaviour

In a bard field, if an extra line of space has ended up at the end of the field, directly following a non text block, and you go to delete it like you would any other empty line of space in a wysiwig or textarea, etc., the browser tries to just go back to the previous page. IF you've recently been "save and continue" ing, the "Are you sure?" warning flashes on the screen for a second, but before you're able to respond, it just goes back to the previous page. IF you've recently been just "save" ing, the "Are you sure?" warning displays, and the "This page is asking you to confirm that you want to leave - data you have entered may not be saved." alert displays, and you are able to respond or cancel, without actually going back in the browser.

Steps to reproduce

  1. edit a bard field
  2. add a non text block within it
  3. add a blank line of space after that non text block
  4. Try to delete last blank line

Server Details

Operating System: macOS High Sierra 10.13.2 (working locally)

Web Server: Apache (via mamp pro)

PHP Version: 7.1.8

Statamic Version: 2.8.2

Updated from an older Statamic or fresh install: Updated

List of installed addons: None

Logs

If any logs (browser, server, or Statamic) are appropriate...

``` Paste em here ```
jasonvarga commented 6 years ago

What browser are you using?

beckysoll commented 6 years ago

Good question, Firefox 57.0.4 - I just tried it out in chrome and did not experience the issue.

jasonvarga commented 6 years ago

Ah, I see it. Good job Firefox.