Browse Source
Merge pull request #3087 from Budibase/fix/flatpickr-key-events
Fix flatpickr hijacking key events on the whole page
master
Andrew Kingston
5 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with
8 additions and
1 deletions
-
packages/client/src/components/ClientApp.svelte
-
packages/client/src/components/app/forms/DateTimeField.svelte
|
|
@ -113,6 +113,13 @@ |
|
|
/> |
|
|
/> |
|
|
{/key} |
|
|
{/key} |
|
|
|
|
|
|
|
|
|
|
|
<!-- |
|
|
|
|
|
Flatpickr needs to be inside the theme wrapper. |
|
|
|
|
|
It also needs its own container because otherwise it hijacks |
|
|
|
|
|
key events on the whole page. It is painful to work with. |
|
|
|
|
|
--> |
|
|
|
|
|
<div id="flatpickr-root" /> |
|
|
|
|
|
|
|
|
<!-- Layers on top of app --> |
|
|
<!-- Layers on top of app --> |
|
|
<NotificationDisplay /> |
|
|
<NotificationDisplay /> |
|
|
<ConfirmationDisplay /> |
|
|
<ConfirmationDisplay /> |
|
|
|
|
|
@ -56,7 +56,7 @@ |
|
|
disabled={fieldState.disabled} |
|
|
disabled={fieldState.disabled} |
|
|
error={fieldState.error} |
|
|
error={fieldState.error} |
|
|
id={fieldState.fieldId} |
|
|
id={fieldState.fieldId} |
|
|
appendTo={document.getElementById("theme-root")} |
|
|
appendTo={document.getElementById("flatpickr-root")} |
|
|
{enableTime} |
|
|
{enableTime} |
|
|
{placeholder} |
|
|
{placeholder} |
|
|
/> |
|
|
/> |
|
|
|