Skip to content

Reduce timing difference for entering text edit mode.#829

Merged
miina merged 1 commit intomasterfrom
fix/729-text-edit
Mar 27, 2020
Merged

Reduce timing difference for entering text edit mode.#829
miina merged 1 commit intomasterfrom
fix/729-text-edit

Conversation

@miina
Copy link
Copy Markdown
Contributor

@miina miina commented Mar 27, 2020

Fixes #729

Reduces timing difference to stop entering edit mode when dragging.

In my testing, even a bit slower than normal click almost never exceeded 150, however, very short dragging was around 250.

Changed the value to 150 which seems to be short enough not to trigger when dragging but long enough even for a bit "slower" click.

@github-actions
Copy link
Copy Markdown
Contributor

Size Change: 0 B

Total Size: 498 kB

ℹ️ View Unchanged
Filename Size Change
assets/css/edit-story.css 3.01 kB 0 B
assets/css/stories-dashboard.css 206 B 0 B
assets/js/edit-story.js 429 kB 0 B
assets/js/stories-dashboard.js 66.1 kB 0 B

compressed-size-action

Copy link
Copy Markdown
Contributor

@spacedmonkey spacedmonkey left a comment

Choose a reason for hiding this comment

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

SGTM

@miina miina merged commit 5693783 into master Mar 27, 2020
@miina miina deleted the fix/729-text-edit branch March 27, 2020 20:35
obetomuniz added a commit that referenced this pull request Mar 30, 2020
* master:
  Update list of Google Fonts
  Bump babel-jest from 25.2.3 to 25.2.4 (#851)
  Resize video while resizing (#804)
  Bump @wordpress/components from 9.2.5 to 9.2.6 (#839)
  Bump eslint-plugin-testing-library from 2.2.3 to 3.0.0 (#849)
  Bump react-moveable from 0.18.1 to 0.19.0 (#850)
  Bump lint-staged from 10.0.9 to 10.0.10
  Bump eslint-plugin-import from 2.20.1 to 2.20.2 (#846)
  Auto-select entire input field on focus (#811)
  Disallow masking for background. (#827)
  Reduce timing difference for entering edit mode. (#829)
  Clicking on media in the gallery should never insert as background (#841)
  Bump @testing-library/dom from 7.1.2 to 7.1.3 (#843)
  Reorderable drag and drop component (#709)
  Minimize layer panel height + fixes for expanding/collapsing (#704)
  remove lingering extra styled component import comment
  adding tests for which icon is present on chip bookmark
  some clean up
  bookmark chip ui component. 2 sizes controlled by constants.js. Storybook + a very basic test
  Template Animations: Added float-on animation (#618)
@swissspidy
Copy link
Copy Markdown
Collaborator

Added to alpha branch

const timingDifference = window.performance.now() - clickTime;

if (timingDifference > 300) {
if (timingDifference > 150) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

150ms is a VERY short click. It was increased to 300ms due to a reported bug that it was too small. I think our problem is more related to the "drag" than speed of click. The coordinates have moved too far and that could be a better indicator.

Copy link
Copy Markdown
Contributor Author

@miina miina Mar 30, 2020

Choose a reason for hiding this comment

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

Hmm, interesting.

When I was testing then the number was mostly under 10 actually, when clicking and holding down (for a moment) then around 100.

However, might be just how it is for me locally. Will reopen the issue then to investigate more.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think it has a lot to do with the type of pointer: mouse vs touchpad vs touch.

@swissspidy swissspidy added the Type: Bug Something isn't working label Mar 31, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Type: Bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Text edit mode often conflicts with dragging operation

6 participants