Skip to content

Conversation

@hydra
Copy link
Contributor

@hydra hydra commented May 28, 2021

I've noticed, over the years, that it was possible to accidentally start a drag-and-drop operation when clicking various elements in the UI, something that shouldn't be possible and certainly isn't possible in native apps.

Similarly, when selecting text it was possible to accidentally select the text of UI elements, again something that shouldn't be possible unless specifically enabled.

This PR:

  • disables text selection for everywhere except the CLI and the LOG.
  • disables drag/drop for all elements.

@hydra
Copy link
Contributor Author

hydra commented May 29, 2021

@McGiverGim is there a CSS selector that selects ALL children, not just direct descendants? If so I could improve the selectors a bit. e.g. <strong> and <span> elements within the LOG <p> elements, and <br> elements within the CLI <div>.

McGiverGim
McGiverGim previously approved these changes May 31, 2021
@McGiverGim
Copy link
Member

@McGiverGim is there a CSS selector that selects ALL children, not just direct descendants? If so I could improve the selectors a bit. e.g. <strong> and <span> elements within the LOG <p> elements, and <br> elements within the CLI

.

@hydra I don' t understand exactly... something like:

tag1 tag2 {
...
}

will affect all the tag2 inside a tag1, but it does not need to be a direct descendant.

haslinghuis
haslinghuis previously approved these changes Jun 2, 2021
Copy link
Member

@haslinghuis haslinghuis left a comment

Choose a reason for hiding this comment

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

@asizon can you confirm, as CSS is your thing 😄

@hydra
Copy link
Contributor Author

hydra commented Jun 3, 2021

I need to fix the OSD drag/drop. Don't merge this yet. I forgot about that.

@hydra hydra dismissed stale reviews from haslinghuis and McGiverGim via ad329c5 June 3, 2021 18:27
@hydra
Copy link
Contributor Author

hydra commented Jun 3, 2021

@McGiverGim ok, fixed with an additional commit.

@sonarqubecloud
Copy link

sonarqubecloud bot commented Jun 3, 2021

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 2 Code Smells

No Coverage information No Coverage information
0.4% 0.4% Duplication

@blckmn
Copy link
Member

blckmn commented Jun 10, 2021

AUTOMERGE: (PASS)

  • Github identifies PR as mergeable -> PASS
  • PR is not in draft -> PASS
  • Assigned to a milestone -> PASS
  • cooling off period lapsed (10/06/2021 01:18:23) -> PASS
  • commit count less or equal to three (3 commits) -> PASS
  • 'Don't merge' label NOT found -> PASS
  • 'Needs coordination with betaflight' label NOT found -> PASS
  • At least one 'RN:' label found -> PASS
  • 'Tested' label found -> PASS
  • assigned to an approver (haslinghuis) -> PASS
  • approver count at least three (3 approvers) -> PASS

@blckmn blckmn merged commit 5627e86 into betaflight:master Jun 10, 2021
@mikeller mikeller modified the milestones: 10.8.0, 10.7.1 Oct 10, 2021
mikeller pushed a commit that referenced this pull request Oct 10, 2021
Prevent drag/dop and text selection on most elements.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants