revanced-patches icon indicating copy to clipboard operation
revanced-patches copied to clipboard

bug(YouTube - Settings): Copy-paste menu has a background layer

Open ILoveOpenSourceApplications opened this issue 1 year ago • 9 comments

Bug description

When trying to either copy or paste something the menu for it is too large which ends up blocking what the user is trying to cut/copy/paste in the first place. This behavior is only present within the ReVanced settings menu only.

Screenshots & Screencaptures

Within Revanced Settings:

https://github.com/ReVanced/revanced-patches/assets/117499019/3c8dd61d-3bff-4644-9846-dee7c95d53f5

https://github.com/ReVanced/revanced-patches/assets/117499019/3f7b61e5-b0a6-466c-8de8-51f0690d2e1c

Screenshot_20240421_192827_YouTube

Within YouTube: Screenshot_20240421_191811_YouTube Screenshot_20240421_191758_YouTube

Error logs

No response

Solution

No response

Additional context

No response

Acknowledgements

  • [X] This issue is not a duplicate of an existing bug report.
  • [X] I have chosen an appropriate title.
  • [X] All requested information has been provided properly.

Screenshot_20240421_191758_YouTube

In this image, copy-paste menu is white for some reason. Is it a bug due to the theme patch? I believe this mainly due to #2786.

Fixing this is tricky, because Android preferences are trash and horribly inflexible and finicky. When I first wrote this custom preference I tried different ways to fix this copy/paste layout sizing but couldn't come up with any fix.

But selecting text individually is not a common use case, and there is a 'copy' button at the bottom.

A more useful change, is to prevent the keyboard from showing when the import/export is opened. Because the user does not type text into this box, but instead copy/pastes everything (so typically the user never selects any text).

LisoUseInAIKyrios avatar Apr 21 '24 14:04 LisoUseInAIKyrios

I changed my theme to light mode when I read something about this being only there in dark mode. But the result is even weirder. There's an additional white box behind the default copy-paste menu, which is the culprit. Screenshot_20240421_202623_YouTube

Whatever that's creating a background layer of nothingness is the issue here. In dark mode, it just blends well with the menu and looks like a huge menu, while in reality it's an additional background box to the default copy-paste menu box. Screenshot_20240421_203202_YouTube

After searching around, I came across this question and an answer at the very bottom which isn't verified, but is it of any help? https://stackoverflow.com/questions/39995735/how-to-change-the-background-of-context-menu-for-edittext

After searching around, I came across this question and an answer at the very bottom which isn't verified, but is it of any help? https://stackoverflow.com/questions/39995735/how-to-change-the-background-of-context-menu-for-edittext

Many of these solutions cannot be easily applied programmatically, since the style is a compiled xml file and integrations cannot access any of these files from the Patches project. Maybe changing the style xml file for YT itself would work, but that might be a bad idea and cause other strange issues.

I revisited trying different ways to force the keyboard not to show, but still could not prevent the keyboard from showing.

LisoUseInAIKyrios avatar Apr 23 '24 10:04 LisoUseInAIKyrios

The buffer icon for the About page is also having the background layer. Screenshot_20240423_234526_YouTube

@LisoUseInAIKyrios, does this comment from @inotia00 help?

He's also provided the commits in this comment.

Yes that works, and could be used to fix this.

LisoUseInAIKyrios avatar May 21 '24 03:05 LisoUseInAIKyrios