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

Fix enter key triggering cancel button on forms #11787

Merged
merged 1 commit into from
Aug 25, 2016
Merged

Fix enter key triggering cancel button on forms #11787

merged 1 commit into from
Aug 25, 2016

Conversation

dgrammatiko
Copy link
Contributor

@dgrammatiko dgrammatiko commented Aug 25, 2016

Pull Request for Issue #11765 .

Summary of Changes

Change button tag to a

Testing Instructions

Create a new article
Add an article title
Click the alias field (or any text field), add text (or not).
Hit 'enter' key

Before patch

Article is cancelled, navigating back to article manager.

After patch

Nothing

Documentation Changes Required

None

@1apweb
Copy link

1apweb commented Aug 25, 2016

I have tested this item ✅ successfully on 295b125


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

@C-Lodder
Copy link
Member

I have tested this item ✅ successfully on 295b125

Also tested in IE8 to see if it threw a hissy fit due to no href being used...all working and good to go.


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

@dgrammatiko
Copy link
Contributor Author

@C-Lodder do you think I should add href="javascript:void(0)" to be safe and fully compliant to standards?

@@ -9,9 +9,9 @@
defined('_JEXEC') or die;

?>
<button class="btn" type="button" onclick="document.getElementById('batch-category-id').value='';document.getElementById('batch-access').value='';document.getElementById('batch-language-id').value=''" data-dismiss="modal">
<a class="btn" type="button" onclick="document.getElementById('batch-category-id').value='';document.getElementById('batch-access').value='';document.getElementById('batch-language-id').value=''" data-dismiss="modal">
Copy link
Member

@yvesh yvesh Aug 25, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As you already started cleaning that up, how about moving that onClick code to a javascript file or at least a script tag? Please? :)

It's really.. Same for all the other onClick events..

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I totally agree with you @yvesh, but not in this PR. After #11654 gets merged, I will try to simplify, beautify all the modal related code

@C-Lodder
Copy link
Member

In HTML5 there's no need. If the href attribute isn't present, it acts as a placeholder.

@MATsxm
Copy link

MATsxm commented Aug 25, 2016

I have tested this item ✅ successfully on 295b125

thanks


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

@jeckodevelopment
Copy link
Member

I have tested this item ✅ successfully on 295b125


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

@jeckodevelopment
Copy link
Member

RTC


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

@joomla-cms-bot joomla-cms-bot added the RTC This Pull Request is Ready To Commit label Aug 25, 2016
@brianteeman brianteeman added this to the Joomla 3.6.3 milestone Aug 25, 2016
@ciar4n
Copy link
Contributor

ciar4n commented Aug 25, 2016

I have tested this item ✅ successfully on 295b125


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

@rdeutz rdeutz merged commit 7194d28 into joomla:staging Aug 25, 2016
@joomla-cms-bot joomla-cms-bot removed the RTC This Pull Request is Ready To Commit label Aug 25, 2016
@dgrammatiko dgrammatiko deleted the fixModalsCloseOnEnter branch August 27, 2016 16:05
roland-d pushed a commit to roland-d/joomla-cms that referenced this pull request Sep 11, 2016
roland-d added a commit to roland-d/joomla-cms that referenced this pull request Sep 11, 2016
…areable-draft-content

* origin/shareable-draft-content: (245 commits)
  Implement shareable draft links
  Cleaned up shared drafts view Added front-end token generarion
  Implement shared drafts view
  Remove obsolete file
  use only root (joomla#11703)
  com_search category results not displaying date (joomla#11802)
  warnings and errors, not notices ... (joomla#11801)
  [installation] Add javascript message titles and ajax errors strings (joomla#11800)
  Regression: Normalising head links and correcting hreflang for menu items associations (joomla#11769)
  Refactor allowEdit of backend category controller (joomla#11547)
  [com_contact] Move event trigger to correct place (joomla#11719)
  Improve the accessibility of the top menu in ISIS part 2 (joomla#11729)
  Show file extension (joomla#11776)
  change button -> a for the modal close button (joomla#11787)
  Small Grammar change (joomla#11788)
  Change message type to error when download of update package fails (joomla#11791)
  these are warnings not messages ... (joomla#11799)
  [plg_content_vote|pagebreak] Load language files only when needed (joomla#11730)
  [plg_system_stats] Load plugin language files only when needed (joomla#11728)
  Fix creation performance of form element menuparent, (slow down in menu item edit form, for item that belongs to large menu) (joomla#11628)
  ...

# Conflicts:
#	administrator/components/com_admin/script.php
#	administrator/components/com_content/models/shared.php
#	administrator/components/com_content/views/shared/tmpl/default.php
#	administrator/language/en-GB/en-GB.xml
#	administrator/language/en-GB/install.xml
#	administrator/manifests/files/joomla.xml
#	administrator/manifests/packages/pkg_en-GB.xml
#	installation/language/en-GB/en-GB.xml
#	language/en-GB/en-GB.xml
#	language/en-GB/install.xml
#	libraries/cms/pagination/pagination.php
#	libraries/cms/version/version.php
#	libraries/joomla/authentication/authentication.php
#	libraries/joomla/form/fields/color.php
#	libraries/joomla/form/fields/email.php
#	media/system/js/share-uncompressed.js
#	media/system/js/share.js
#	plugins/content/vote/vote.php
roland-d added a commit to roland-d/joomla-cms that referenced this pull request Sep 11, 2016
…areable-draft-content

* origin/shareable-draft-content: (253 commits)
  Fixed conflict
  Added menu item
  Code cleanup
  Implement shareable draft links
  Cleaned up shared drafts view Added front-end token generarion
  Implement shared drafts view
  Remove obsolete file
  use only root (joomla#11703)
  com_search category results not displaying date (joomla#11802)
  warnings and errors, not notices ... (joomla#11801)
  [installation] Add javascript message titles and ajax errors strings (joomla#11800)
  Regression: Normalising head links and correcting hreflang for menu items associations (joomla#11769)
  Refactor allowEdit of backend category controller (joomla#11547)
  [com_contact] Move event trigger to correct place (joomla#11719)
  Improve the accessibility of the top menu in ISIS part 2 (joomla#11729)
  Show file extension (joomla#11776)
  change button -> a for the modal close button (joomla#11787)
  Small Grammar change (joomla#11788)
  Change message type to error when download of update package fails (joomla#11791)
  these are warnings not messages ... (joomla#11799)
  ...

# Conflicts:
#	administrator/components/com_admin/script.php
#	administrator/components/com_content/controllers/article.php
#	administrator/components/com_content/controllers/articles.php
#	administrator/components/com_content/models/forms/article.xml
#	administrator/components/com_content/views/article/view.html.php
#	administrator/components/com_content/views/articles/view.html.php
#	components/com_content/views/form/tmpl/edit.php
#	libraries/cms/pagination/pagination.php
#	libraries/joomla/form/fields/email.php
#	plugins/content/vote/vote.php
@SharkyKZ SharkyKZ mentioned this pull request Jun 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants