? Pending

User tests: Successful: Unsuccessful:

avatar DrDreave
DrDreave
30 Aug 2017

Pull Request for Issue #17741.

Summary of Changes

Added type="button" to the datepicker's action buttons as the browser interprets buttons
without a type as submit button, so it (the first button in the form) gets triggered when pressing enter within the containing form.

See #17741.

Testing Instructions

  • Open an admin form with date field (i.e. an existing article)
  • Go to the Publishing options
  • Make sure there is a date value selected for Start Publishing and Created Date.
  • If not set these date fields and save the article.
  • Click into the input field of the Created Date option then.
  • Press the enter key

Expected result

Nothing should change with the selected dates visible in Start Publishing and in Created Date

Actual result

Input of Start Publishing is cleared.
(It is always the input of the first date field in the form that is cleared)

Documentation Changes Required

None.

Notes

Maybe the form should be submitted when pressing enter, this isn't happening automatically as the toolbar buttons are outside of the form.

Developed @icampus

avatar joomla-cms-bot joomla-cms-bot - change - 30 Aug 2017
Category JavaScript
avatar DrDreave DrDreave - open - 30 Aug 2017
avatar DrDreave DrDreave - change - 30 Aug 2017
Status New Pending
avatar dgt41
dgt41 - comment - 30 Aug 2017

@DrDreave on code review this looks fine, thanks!

avatar franz-wohlkoenig franz-wohlkoenig - test_item - 30 Aug 2017 - Tested unsuccessfully
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 30 Aug 2017

I have tested this item ? unsuccessfully on 4247206

Same behaviour as without PR: Curser in "Created Date" and hit "Enter" get "Start Publishing" empty.

System information

3.8.0-beta5-dev
Multilanguage Site
macOS Sierra, 10.12.6
Firefox 55 (64-bit)

MAMP 4.1.1

avatar dgt41
dgt41 - comment - 30 Aug 2017

@franz-wohlkoenig @DrDreave weird I just tried the original code in safari and I don't get a wrong behaviour. Can you please mention the browser and you Joomla setup (custom fields, multilingual etc)

EDIT Firefox and Chrome submit the form on enter

avatar franz-wohlkoenig
franz-wohlkoenig - comment - 30 Aug 2017

@dgt41

System information

3.8.0-beta5-dev
no custim Fields
Multilanguage Site
macOS Sierra, 10.12.6
Firefox 55 (64-bit)

MAMP 4.1.1

  • PHP 7.0.15
  • MySQLi 5.6.35
avatar DrDreave
DrDreave - comment - 30 Aug 2017

I can confirm the original issue in Chrome Version 60.0.3112.101 and Firefox 55.0.2 on MacOS. The date input gets cleared, the form doesn't get submitted. The PR fixes the clearance of the date input on a stock joomla 3.8. I'll perform further tests on my Windows PC in the next hours.

Safari seems to work fine without the patch as mentioned by @dgt41.

@franz-wohlkoenig Please try to clear your browser cache. Maybe the browser didn't reload the minified javascript after applying the patch.

avatar franz-wohlkoenig franz-wohlkoenig - test_item - 30 Aug 2017 - Tested successfully
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 30 Aug 2017

I have tested this item successfully on 4247206

Cleared Browsercache helped.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/17777.

avatar franz-wohlkoenig
franz-wohlkoenig - comment - 30 Aug 2017

I have tested this item successfully on 4247206

Cleared Browsercache helped.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/17777.

avatar dgt41 dgt41 - test_item - 30 Aug 2017 - Tested successfully
avatar dgt41
dgt41 - comment - 30 Aug 2017

I have tested this item successfully on 4247206


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/17777.

avatar franz-wohlkoenig franz-wohlkoenig - change - 30 Aug 2017
Status Pending Ready to Commit
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 30 Aug 2017

RTC after two successful tests.

avatar mbabker mbabker - change - 31 Aug 2017
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2017-08-31 11:52:41
Closed_By mbabker
Labels Added: ?
avatar mbabker mbabker - close - 31 Aug 2017
avatar mbabker mbabker - merge - 31 Aug 2017

Add a Comment

Login with GitHub to post a comment