Bug 8022 - Selection appearing in front of session after long press in control bar on iOS
Summary: Selection appearing in front of session after long press in control bar on iOS
Status: CLOSED FIXED
Alias: None
Product: ThinLinc
Classification: Unclassified
Component: Web Access (show other bugs)
Version: trunk
Hardware: PC Unknown
: P2 Normal
Target Milestone: 4.15.0
Assignee: Samuel Mannehed
URL:
Keywords: linma_tester, prosaic, tobfa_tester
Depends on:
Blocks:
 
Reported: 2022-11-10 17:05 CET by Samuel Mannehed
Modified: 2022-12-16 14:46 CET (History)
3 users (show)

See Also:
Acceptance Criteria:
* Long pressing in the control bar should not result in selection boxes in front of the session * The logo and the buttons in the control bar should not be selectable * Text in the clipboard should still be selectable


Attachments
Screenshot of broken state in iOS (625.19 KB, image/png)
2022-11-10 17:05 CET, Samuel Mannehed
Details

Description Samuel Mannehed cendio 2022-11-10 17:05:56 CET
Created attachment 1076 [details]
Screenshot of broken state in iOS

This can be reproduced by long pressing with your finger in the control bar, somewhere in the space in between control bar buttons. Only seen in Safari on iOS.

This results in an annoying state where many things in the session are selected by the browser. These selections are in front of everything else and can't be deselected in any way. See the screenshot of how things look.
Comment 1 Samuel Mannehed cendio 2022-11-10 17:06:53 CET
It became easier to trigger the broken state after the redesigns of the control bar in bug 7908 since the spacing between the buttons got larger.
Comment 3 Samuel Mannehed cendio 2022-11-10 17:19:22 CET
Note that this wording in one of our commit messages was too harsh:

> This results in a broken state where the user can't interact with the session anymore.

It was still possible to click and interact with things in the session, but the blue selection boxes are in front of everything and are very distracting.
Comment 4 Samuel Mannehed cendio 2022-11-10 17:39:58 CET
This has now been fixed.

It appears that any slight movement after the long press in the control bar resulted in almost the entire page being selected. This continued to happen even after selection was disabled in the control bar itself. It is unclear why Safari behaves like this.

Aside from the main fix for this bug, a few additional related changes were also made:

 * It's no longer possible to select the logo or the buttons in the control bar
 * The logo is no longer "draggable", this means clicking and holding the mouse on the logo no longer lets you drag it
 * Long pressing in iOS on the logo or the buttons in the control bar no longer produces a popup
Comment 6 Linn cendio 2022-11-17 12:11:07 CET
Tested with server build 2925 on Fedora 35, and browsers: 
* Firefox, v. 105
* Chromium, v. 103
* Safari, v. 16 (desktop)
* Safari, v. 16 (iOS)

> * Long pressing in the control bar should not result in selection boxes in front of the session
This only regards iOS, and the pop-ups are not shown after fixing this bug. However, note that the cache has to be cleared for the changes to show if you were logged in when this was still an issue.

> * The logo and the buttons in the control bar should not be selectable
It is not.

> * Text in the clipboard should still be selectable
It is.


Also tested that the logo is no longer draggable and that it is no longer possible to select the control bar (the state in the provided screenshot).

Additionally, the code looked good, except for a descriptive comment about the scenario described in comment 3. However, that comment has been updated now, so the code gets a full pass :)
Comment 7 Pierre Ossman cendio 2022-12-07 14:24:55 CET
This issue was also reported upstream, using a slightly different method:

https://github.com/novnc/noVNC/issues/1722
Comment 8 Pierre Ossman cendio 2022-12-07 14:25:56 CET
There is still a bit of remnant of this issue on iOS, using the method reported for noVNC.

If I double-click using the trackpad, then the cursor will now get a selection box around it.

Not as bad as when the entire session was selected, but still broken.
Comment 9 Fredrik cendio 2022-12-14 12:47:47 CET
This is now fixed and resolved to the point it's smaller bugs that rarely occur and have been submitted in the bug 8045.

This fix the cursor select around the cursor when double-click on iOS.
Comment 10 Pierre Ossman cendio 2022-12-14 13:49:56 CET
Also committed upstream:

https://github.com/novnc/noVNC/commit/90f120c1394c9f10fa34c78b08bade4c431aedf7
Comment 11 Tobias cendio 2022-12-15 17:21:16 CET
General
======================
Tested with server dev build #2960 on the following OS and browsers

Fedora 37
   Firefox 107.0.1
   Chrome 108.0.5359.124
   Chromium 107.0.5304.121

Mac 13.1
   Firefox 107.0.1
   Chrome 108.0.5359.124
   Edge 108.0.1462.46
   Safari 16.2

iPad mini 6th gen, iPadOS 16.1.1
   Safari 16
   Chrome 108
   Firefox 108
   Edge 108

Acceptance criteria
======================
[✓] Long pressing in the control bar should not result in selection boxes in
    front of the session

[✓] The logo and the buttons in the control bar should not be selectable

[✓] Text in the clipboard should still be selectable

Further testing
======================
* The controlbar button images can be dragged on Chrome, Chromium, and Edge
  desktop browsers.

* Hovering over the clipboard headers in Safari on Mac triggers a selection
  cursor, but unable to select the header text. Not observed for the other
  browsers.

* The issue mentioned in bug 8045 can be triggered by simply pressing a
  controlbar button with an iPad touch pen. Perhaps it registers a slight
  movement, hence the selection phenomenon.

* It seems you can mitigate the issue mentioned in bug 8045 by disabling user
  selection in the noVNC_credentials_dlg label subelements.

Conclusion
======================
Acceptance criteria are met for desktop browsers and iOS, albeit bug 8045 is
still present. General testing with a trackpad, as mentioned in comment 7 and
comment 8, remains to be done.
Comment 13 Samuel Mannehed cendio 2022-12-16 14:46:43 CET
Things work well with a trackpad on iOS as well.

I could reproduce the issue with the trackpad double click selection on tl.cendio.se, and can confirm that it is fixed with jenkins build 2958.

Closing.

Note You need to log in before you can comment on or make changes to this bug.