Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Panel] Number Field Does Not Save Empty Value After Losing Focus (3.3.0 Regression) #2288

Closed
neildaniels opened this issue Nov 6, 2019 · 1 comment

Comments

@neildaniels
Copy link
Contributor

@neildaniels neildaniels commented Nov 6, 2019

Describe the bug
If you attempt to clear a number field in the Panel, it will only save the "empty" value if you save the page while the number field still has typing focus. If you click on another field, the "empty" value will never actually be saved (even if you click back into the original field).

I suspect there's something wrong with savings values in general, but can only reliably produce this "empty value" scenario as described.

To Reproduce
Steps to reproduce the behavior:

  1. Have the following Blueprint test-template.yml
title: Test Template

fields:
  foo:
    type: number
    width: 1/2
  bar:
    type: number
    width: 1/2
  text:
    type: textarea
    width: 1/2
  1. Have the following template test-template.php
<html>
    <body>

Foo: <?= $page->foo()->html() ?>

<br><br>

Bar: <?= $page->bar()->html() ?>

<br><br>

Text: <?= $page->text()->html() ?>
  1. Create a page in the Panel with this template type
  2. Fill in values such as 2, 4, and some text.

Screen Shot 2019-11-06 at 2 27 14 PM

  1. Save that in the Panel and view the page.

Screen Shot 2019-11-06 at 2 26 49 PM

  1. Go back to the Panel page and clear both number field then change the text field to other text. Save the page with Command-S

Screen Shot 2019-11-06 at 2 28 03 PM

7. Re-load the rendered page.

Screen Shot 2019-11-06 at 2 28 35 PM

8. Go back to the Panel and re-load the page. You'll see that the original `2` and `4` values return.

Kirby Version
3.3.0

Desktop (please complete the following information):

  • OS: macOS
  • Safari 13.0.3 (15608.3.10.1.4)
  • Chrome 78.0.3904.87
@neildaniels neildaniels changed the title [Panel] `number` Field Only Saves Cleared Value When it Has Focus (3.3.0 Regression) [Panel] `number` Does Not Save Empty Value After Losing Focus (3.3.0 Regression) Nov 6, 2019
@neildaniels neildaniels changed the title [Panel] `number` Does Not Save Empty Value After Losing Focus (3.3.0 Regression) [Panel] Number Field Does Not Save Empty Value After Losing Focus (3.3.0 Regression) Nov 6, 2019
@afbora afbora added this to the 3.3.1 milestone Nov 7, 2019
bastianallgeier added a commit that referenced this issue Nov 18, 2019
@bastianallgeier

This comment has been minimized.

Copy link
Contributor

@bastianallgeier bastianallgeier commented Nov 19, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
3 participants
You can’t perform that action at this time.