Closed (fixed)
Project:
Dismiss
Version:
7.x-1.x-dev
Component:
User interface
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
29 May 2015 at 14:57 UTC
Updated:
7 Jul 2015 at 14:24 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
aaronbaumanActually that doesn't make any sense, because if the behavior weren't attached the dismiss button would not appear.
I think this must be an application issue on my end.
Comment #2
aaronbaumanOK, I see the problem:
The callback renders the message inside a <form> element.
Therefore, the <button> element used by dismiss causes a form submit.
Arguably a different element should be used, but at any rate the button should definitely not submit the form.
Attached patch adds a simple "preventDefault" to the click handler.
Comment #3
ruplHi there, thanks for this patch! I think preventing the event from bubbling is the best solution. I will remove the
return false;from your patch since that creates other undesirable behavior but otherwise commit as is.Regarding the
<button>being inappropriate, please read #2083375: Close button is inaccessible to understand why that markup was chosen. It's the best option for accessibility.Comment #5
ruplComment #6
ruplI created a new release containing this fix. Thanks for your contribution!
https://www.drupal.org/node/2510666
Comment #7
aaronbaumanOK great, thanks for the review and the background regarding button element.