Skip to content

[stable34] fix(FloatingButtons): hide btns until first mousemove - #9101

Merged
silverkszlo merged 1 commit into
stable34from
fix/hide-floating-btns
Aug 26, 2026
Merged

[stable34] fix(FloatingButtons): hide btns until first mousemove#9101
silverkszlo merged 1 commit into
stable34from
fix/hide-floating-btns

Conversation

@silverkszlo

Copy link
Copy Markdown
Collaborator

📝 Summary

Floating buttons overlapped the placeholder when opening Text editor on Android ~tablet-size. This fix hides them on mount until first mousemove. The Vue 3 wrapper of @tiptap/extension-drag-handle does that internally, so this is only needed for the stable branches.

The buttons only render when the viewport is >= 1024px: they are gated by showFloatingButtons in ContentContainer.vue, which uses useIsMobile(), a pure width check. The DragHandle plugin positions and reveals the buttons only in its mousemove handler. Until then they sit unpositioned at the editor's top-left corner, on top of the placeholder. Touch devices never fire mousemove, so on tablet-size touch screens (wide enough to pass the width check) the buttons stayed overlapping the placeholder permanently.

🖼️ Screenshots

🏚️ Before | 🏡 After
Attachment file 1 Bug7222980_1785523514966!screen1
|
Screenshot from 2026-08-25 09-20-15

B | A

🏁 Checklist

  • Code is properly formatted (npm run lint / npm run stylelint / composer run cs:check)
  • Sign-off message is added to all commits
  • Tests (unit, integration and/or end-to-end) passing and the changes are covered with tests
  • Documentation (README or documentation) has been updated or is not required

🤖 AI (if applicable)

  • The content of this PR was partly or fully generated using AI tools
  • The AI-generated content was reviewed, comprehended and tested by a human

Signed-off-by: silver <s.szmajduch@posteo.de>
Assisted-by: ClaudeCode:claude-fable-5

@max-nextcloud max-nextcloud left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So this means these buttons will stay hidden on touch devices no matter what, right?

They do seem useful though. Can't we trigger the positioning differently from the mouse move?

@silverkszlo

Copy link
Copy Markdown
Collaborator Author

So this means these buttons will stay hidden on touch devices no matter what, right?

They do seem useful though. Can't we trigger the positioning differently from the mouse move?

As far as I understand it, they were always hidden on touch devices:

@max-nextcloud

Copy link
Copy Markdown
Collaborator

I think isMobile only checks the screen size. It has the wrong name. At least your PR description says:

The buttons only render when the viewport is >= 1024px: they are gated by showFloatingButtons in ContentContainer.vue, which uses useIsMobile(), a pure width check.

@silverkszlo

silverkszlo commented Aug 25, 2026

Copy link
Copy Markdown
Collaborator Author

I think isMobile only checks the screen size. It has the wrong name. At least your PR description says:

The buttons only render when the viewport is >= 1024px: they are gated by showFloatingButtons in ContentContainer.vue, which uses useIsMobile(), a pure width check.

Ah, you mean touch devices with big screens, now I get it :)

So according to my UI testing in the browser, the floating buttons appear on touch devices with >=1024px screens when you tap on a paragraph, which should be fine, right?

I have tested that with with Chrome's DevTools → Sensors → Show Sensors → Touch: Force enabled

@github-project-automation github-project-automation Bot moved this to 🧭 Planning evaluation (don't pick) in 📝 Productivity team Aug 25, 2026
@silverkszlo silverkszlo moved this from 🧭 Planning evaluation (don't pick) to 👀 In review in 📝 Productivity team Aug 25, 2026
@max-nextcloud
max-nextcloud self-requested a review August 26, 2026 08:00
@silverkszlo

Copy link
Copy Markdown
Collaborator Author

/backport to stable33 please

@silverkszlo

Copy link
Copy Markdown
Collaborator Author

/backport to stable32 please

@silverkszlo

Copy link
Copy Markdown
Collaborator Author

/backport to stable31 please

@silverkszlo
silverkszlo merged commit a7f6c6d into stable34 Aug 26, 2026
64 checks passed
@silverkszlo
silverkszlo deleted the fix/hide-floating-btns branch August 26, 2026 08:17
@github-project-automation github-project-automation Bot moved this from 👀 In review to ☑️ Done in 📝 Productivity team Aug 26, 2026
@backportbot

backportbot Bot commented Aug 26, 2026

Copy link
Copy Markdown

The backport to stable31 failed. Please do this backport manually.

# Switch to the target branch and update it
git checkout stable31
git pull origin stable31

# Create the new backport branch
git checkout -b backport/9101/stable31

# Cherry pick the change from the commit sha1 of the change against the default branch
# This might cause conflicts, resolve them
git cherry-pick 49eb01fb

# Push the cherry pick commit to the remote repository and open a pull request
git push origin backport/9101/stable31

Error: Failed to check for changes with origin/stable31: No changes found in backport branch


Learn more about backports at https://docs.nextcloud.com/server/stable/go.php?to=developer-backports.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: ☑️ Done

Development

Successfully merging this pull request may close these issues.

2 participants