Dialog hidden submit buttons don't work in Safari

Created on 20 April 2022, over 2 years ago
Updated 4 April 2023, over 1 year ago

Problem/Motivation

When dialog.ajax.js copies a forms buttons to the bottom of the dialog it sets the original submit button to display: none; If I hit enter in a text field to submit the form it works fine in Chrome, but Safari seems to handle hidden submit buttons differently and submits the form without Ajax.

Webkit has a "won't fix" bug report for this. They wanted the behavior to match IE which had the largest market share at the time. Chrome fixed this bug in Feb 2014 apparently citing web compatibility. There was a whatwg discussion about it that didn't really go anywhere. Matt Snider details some stuff around this behavior for each browser which is a good read.

Steps to reproduce

  • Add a node.
  • Add some text to a field with a CKeditor.
  • Highlight the text and click the Add Link button.
  • Hit enter.

In Chrome it AJAX submits, but in Safari it seems to submit without AJAX. Please see attached video β†’ .

Proposed resolution

Let's use visibility-hidden instead of display: none. 😏

πŸ› Bug report
Status

Needs work

Version

9.5

Component
AjaxΒ  β†’

Last updated about 2 hours ago

Created by

πŸ‡ΊπŸ‡ΈUnited States tim bozeman

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡ΊπŸ‡ΈUnited States smustgrave

    This issue is being reviewed by the kind folks in Slack, #needs-review-queue-initiative. We are working to keep the size of Needs Review queue [2700+ issues] to around 400 (1 month or less), following Review a patch or merge request β†’ as a guide.

    Can confirm this issue in safari and that it's fixed in #13

    This will need a D10 patch, think it's an issue in D10 but less noticable as ckeditor5 doesn't use popups so this error doesn't occur.

  • Status changed to Needs work over 1 year ago
  • πŸ‡¦πŸ‡ΊAustralia larowlan πŸ‡¦πŸ‡ΊπŸ.au GMT+10

    We need a D10 only patch here too, as we don't have the compiled versions in core from 10 onwards, just the original es6 versions.

  • πŸ‡ΊπŸ‡ΈUnited States tim bozeman

    Well, I'm glad that ckeditor5 doesn't use popups so I guess I don't need to worry about it, but here's the patch rerolled for D10 just in case.

    Also, here's a little module that I thought would show the bug in D10, but now Safari and Chrome both submit via page request instead of an AJAX post. πŸ€” I feel like they should both AJAX submit here... Needs more research I guess.

Production build 0.71.5 2024