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

Disable user-select on user facing pages (run mode) to prevent text selection issues #1283

Merged
merged 2 commits into from
Jan 21, 2022

Conversation

tarag
Copy link
Contributor

@tarag tarag commented Jan 18, 2022

Disable user-select on user facing pages (run mode) to prevent text selection issues

On iOS particularly, there are some issues when performing involuntary long presses while browsing and manipulation of main UI page, text in the displayed page or sometimes in background invisible pages can be highlighted which disrupts user manipulation. This patch prevents user selection on runtime pages to avoid these issues.

I had no access to Android device to test if the issue occurs but the patch has been made to also cover this platform.

Example of issue before PR applied:
user-select-orig

Result with PR applied:
user-select-patched

…ntary text selection issues

Signed-off-by: Gautier Taravella <tarag@mailbox.org>
@tarag tarag requested a review from a team as a code owner January 18, 2022 17:17
@relativeci
Copy link

relativeci bot commented Jan 18, 2022

Job #339: Bundle Size — 10.67MB (~+0.01%).

ab31798 vs 85daaac

Changed metrics (3/8)
Metric Current Baseline
Initial JS 1.67MB(~+0.01%) 1.67MB
Initial CSS 605.15KB(+0.02%) 605.01KB
Cache Invalidation 21.32% 15.79%
Changed assets by type (2/7)
            Current     Baseline
CSS 851.92KB (+0.02%) 851.78KB
JS 8.62MB (~+0.01%) 8.62MB

View Job #339 report on app.relative-ci.com

@ghys
Copy link
Member

ghys commented Jan 19, 2022

Ok, what about the widgets allowing user input though? (oh-input, oh-rollershutter depending on config)

…s file.

Signed-off-by: Gautier Taravella <tarag@mailbox.org>
@tarag
Copy link
Contributor Author

tarag commented Jan 20, 2022

Ok, what about the widgets allowing user input though? (oh-input, oh-rollershutter depending on config)

I just tested with an input text card. Even with the page preventing user select upon long press, long press works inside of the text field so selection, copying and pasting is possible. I assume this directive is overridden by the browser for user input html fields.
I don't understand what kind of input there would be in roller shutter cards. It looks only like buttons to me. Can you explain ?

@ghys
Copy link
Member

ghys commented Jan 21, 2022

I don't understand what kind of input there would be in roller shutter cards. It looks only like buttons to me. Can you explain ?

Sorry I meant the oh-stepper and derivatives - you can configure them to have an input box to type the desired number (it's even the default IIRC).

Copy link
Member

@ghys ghys left a comment

Choose a reason for hiding this comment

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

Okay, let's try it out - if it causes problems we can always adjust later. Thanks!

@ghys ghys merged commit e8bc0bf into openhab:main Jan 21, 2022
@ghys ghys added bug Something isn't working main ui Main UI labels Jan 21, 2022
@ghys ghys added this to the 3.3 milestone Jan 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working main ui Main UI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants