Safari and Firefox differ in event handling behavior when placing <div> elements inside <button> elements. * STEPS TO REPRODUCE 1. Open attached test case and click within the red block. * RESULTS In Firefox, the button gets the event. In Safari both the div *and* button receive events.
Created attachment 16868 [details] test case
The comportament of Firefox is similar in Internet Explorer 6, and Opera 9.63 whitch I presume it is correct one.
See also: bug 89041, bug 99712.
I am able to reproduce this bug in Safari 15.6 on macOS 12.5 an it gives <div> and <button> events while Firefox Nightly 105 only does <button> event. While Chrome Canary 106 matches with Safari here. I am not sure on web-spec so I would leave the team to decide whether it is something which needs to be aligned with Firefox or Firefox need to change the behavior. Thanks!
<rdar://problem/98330762>