Make WordPress Core

Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#20557 closed enhancement (fixed)

Sortable meta boxes are too touchy

Reported by: helenyhou's profile helenyhou Owned by: nacin's profile nacin
Milestone: 3.4 Priority: normal
Severity: normal Version:
Component: UI Keywords: has-patch commit
Focuses: Cc:

Description

When scrolling a screen with many sortable meta boxes on a touch device, there is a high likelihood of inadvertently dragging a meta box around. This becomes very frustrating very quickly.

Attachments (4)

20557.diff (377 bytes) - added by helenyhou 13 years ago.
20557-revised.diff (416 bytes) - added by georgestephanis 13 years ago.
Please confirm, but this should apply the change only on 'mobile' (touch screen) devices.
quicker-method.diff (805 bytes) - added by georgestephanis 13 years ago.
tweaked the last patch for speed, and modified another ifcheck to use the body class (which has much more logic thrown into it in the back-end than just checking the UA string)
quicker-method.corrected.diff (748 bytes) - added by georgestephanis 13 years ago.
Whoops, used the longhand version in the last try.

Download all attachments as: .zip

Change History (10)

@helenyhou
13 years ago

#1 @helenyhou
13 years ago

  • Keywords has-patch added

20557.diff introduces a delay of 200 to adjust. This does not seem to impact actual dragging into place on a computer, as mouse movement to drag takes at least that long to accomplish.

#2 @DrewAPicture
13 years ago

  • Cc xoodrew@… added

Had the same problem on my TouchPad. The patch adds just enough delay to remove the annoying-factor. +1

#3 @nacin
13 years ago

  • Keywords commit added
  • Milestone changed from Awaiting Review to 3.4

@georgestephanis
13 years ago

Please confirm, but this should apply the change only on 'mobile' (touch screen) devices.

#4 @nacin
13 years ago

  • Owner set to nacin
  • Resolution set to fixed
  • Status changed from new to closed

In [20614]:

Add a 200ms delay when dragging a meta box on mobile devices, to prevent inadvertently dragging meta boxes around on a touch screen.

props helenyhou, georgestephanis. fixes #20557.

@georgestephanis
13 years ago

tweaked the last patch for speed, and modified another ifcheck to use the body class (which has much more logic thrown into it in the back-end than just checking the UA string)

#5 follow-up: @georgestephanis
13 years ago

Not sure if it's worth changing to this latest patch, but it may speed one bit up and tidy another.

@georgestephanis
13 years ago

Whoops, used the longhand version in the last try.

#6 in reply to: ↑ 5 @azaozz
13 years ago

Replying to georgestephanis:

In theory:

  • $('body').hasClass('mobile') is pretty fast,
  • document.body.className.match(/mobile/) is few milliseconds faster but could potentially match something else (class like 'not-mobile'),
  • $(document.body).hasClass('mobile') is another way to reference the body and seems a tiny bit faster than the tag name above.
Note: See TracTickets for help on using tickets.