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

CheckBox Editor does not work as expected in Safari #1458

Closed
Mak006 opened this issue Apr 20, 2020 · 3 comments · Fixed by #1459
Closed

CheckBox Editor does not work as expected in Safari #1458

Mak006 opened this issue Apr 20, 2020 · 3 comments · Fixed by #1459

Comments

@Mak006
Copy link

Mak006 commented Apr 20, 2020

Using Safari 13, the checkbox is not clickable when editOn = click. To reproduce this issue, navigate to the editor tests:

https://dgrid.io/js/dgrid/test/Editor.html

Select:

  • Component Type = checkbox
  • editon = click

Press the "Recreate Grid" button.

You will notice that when selecting the text (true/false) on the rendered cell, the checkbox will show up. However, if you try to toggle the checkbox, the grid is blurred and the value never changes.

msssk added a commit to msssk/dgrid that referenced this issue Apr 25, 2020
In OS X form controls are not considered focusable elements. Some browsers
(Safari, Firefox) adopt this decision:
whatwg/html#4356
https://bugzilla.mozilla.org/show_bug.cgi?id=1524863
https://bugs.webkit.org/show_bug.cgi?id=22261
The resulting implementation is broken - you can call `focus()` on a checkbox
and it will be focused, but clicking on a checkbox does not focus it. Further,
clicking on a focused checkbox blurs it. To overcome these challenges
checkboxes and radios are wrapped in a div that can receive focus (and blur)
in a consistent manner.

Fixes SitePen#1458
@Mak006
Copy link
Author

Mak006 commented Apr 27, 2020

Is it also possible to have this fix applied to dgrid 0.3.16?

msssk added a commit that referenced this issue Apr 27, 2020
Editor: wrap checkbox and radio button shared editors on Mac

In OS X form controls are not considered focusable elements. Some browsers
(Safari, Firefox) adopt this decision:
whatwg/html#4356
https://bugzilla.mozilla.org/show_bug.cgi?id=1524863
https://bugs.webkit.org/show_bug.cgi?id=22261
The resulting implementation is broken - you can call `focus()` on a checkbox
and it will be focused, but clicking on a checkbox does not focus it. Further,
clicking on a focused checkbox blurs it. To overcome these challenges
checkboxes and radios are wrapped in a div that can receive focus (and blur)
in a consistent manner.

Fixes #1458
msssk added a commit that referenced this issue Apr 28, 2020
Editor: wrap checkbox and radio button shared editors on Mac

In OS X form controls are not considered focusable elements. Some browsers
(Safari, Firefox) adopt this decision:
whatwg/html#4356
https://bugzilla.mozilla.org/show_bug.cgi?id=1524863
https://bugs.webkit.org/show_bug.cgi?id=22261
The resulting implementation is broken - you can call `focus()` on a checkbox
and it will be focused, but clicking on a checkbox does not focus it. Further,
clicking on a focused checkbox blurs it. To overcome these challenges
checkboxes and radios are wrapped in a div that can receive focus (and blur)
in a consistent manner.

Fixes #1458
msssk added a commit that referenced this issue Apr 28, 2020
In OS X form controls are not considered focusable elements. Some browsers
(Safari, Firefox) adopt this decision:
whatwg/html#4356
https://bugzilla.mozilla.org/show_bug.cgi?id=1524863
https://bugs.webkit.org/show_bug.cgi?id=22261
The resulting implementation is broken - you can call `focus()` on a checkbox
and it will be focused, but clicking on a checkbox does not focus it. Further,
clicking on a focused checkbox blurs it. To overcome these challenges
checkboxes and radios are wrapped in a div that can receive focus (and blur)
in a consistent manner.

Fixes #1458
@msssk
Copy link
Contributor

msssk commented Apr 28, 2020

@Mak006 This fix is backported to the 0.3 branch in 65aad0b. Please test with the dev-0.3 branch and let us know if you encounter issues.

@msssk
Copy link
Contributor

msssk commented Jun 22, 2020

Released in v0.3.21, v0.4.6, and v1.3.2.

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 a pull request may close this issue.

2 participants