Skip to content

fix(files_sharing): Improve expiration date input change handling - #52364

Merged
susnux merged 2 commits into
masterfrom
fix/51875/allow-keyboard-input-4-share-expiration-on-chrome
Apr 24, 2025
Merged

fix(files_sharing): Improve expiration date input change handling#52364
susnux merged 2 commits into
masterfrom
fix/51875/allow-keyboard-input-4-share-expiration-on-chrome

Conversation

@nfebe

Copy link
Copy Markdown
Contributor

If the time picker component is emitting a Date object already, then there is redundant call of new Date(new Date()) and therefore introduces subtle bugs, for example on chrome users could not enter expiration date with keyboard.

  • Use @update:model-value instead of @change/@input for more reliable date updates
  • Ensure null and invalid dates are handled correctly in onExpirationChange
  • Validate date input before updating defaultExpirationDateEnabled

Resolves : #51875

@github-project-automationgithub-project-automationBot moved this to 🏗️ In progress in 📁 Files teamApr 23, 2025
@nfebe
nfebeforce-pushed the fix/51875/allow-keyboard-input-4-share-expiration-on-chrome branch from 16d2be1 to 3c4640eCompareApril 23, 2025 09:38
@nfebe
nfebe marked this pull request as ready for review April 23, 2025 09:38
@nfebe
nfebe requested a review from a team as a code ownerApril 23, 2025 09:38
Comment threadapps/files_sharing/src/components/SharingEntryLink.vue Outdated
@nfebe
nfebeforce-pushed the fix/51875/allow-keyboard-input-4-share-expiration-on-chrome branch from 3c4640e to 2f6c171CompareApril 23, 2025 21:43
@miaulalala

Copy link
Copy Markdown
Contributor

/backport to stable31

@miaulalala

Copy link
Copy Markdown
Contributor

/backport to stable30

@miaulalala

Copy link
Copy Markdown
Contributor

/backport to stable29

If the time picker component is emitting a Date object already, then there is redundant call of `new Date(new Date())` and
therefore introduces subtle bugs, for example on chrome users could not enter expiration date with keyboard.
- Use @update:model-value instead of @change/@input for more reliable date updates
- Ensure null and invalid dates are handled correctly in onExpirationChange
- Validate date input before updating defaultExpirationDateEnabled
Resolves : #51875
Signed-off-by: nfebe <fenn25.fn@gmail.com>
@susnux
susnuxforce-pushed the fix/51875/allow-keyboard-input-4-share-expiration-on-chrome branch from 2f6c171 to 3c73f3fCompareApril 24, 2025 10:25
@susnux

Copy link
Copy Markdown
Contributor

/compile

@susnux
susnux enabled auto-merge April 24, 2025 10:25
Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
@skjnldsvskjnldsv mentioned this pull request Aug 19, 2025
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to reviewWaiting for reviewsfeature: sharing

Projects

Status: 🏗️ In progress

Development

Successfully merging this pull request may close these issues.

[Bug]: expiration date can not be set in chrome via keyboard

4 participants

@nfebe@miaulalala@susnux@nextcloud-command