Make WordPress Core

Opened 12 years ago

Closed 12 years ago

Last modified 12 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 12 years ago.
20557-revised.diff (416 bytes) - added by georgestephanis 12 years ago.
Please confirm, but this should apply the change only on 'mobile' (touch screen) devices.
quicker-method.diff (805 bytes) - added by georgestephanis 12 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 12 years ago.
Whoops, used the longhand version in the last try.

Download all attachments as: .zip

Change History (10)

@helenyhou
12 years ago

#1 @helenyhou
12 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
12 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
12 years ago

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

@georgestephanis
12 years ago

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

#4 @nacin
12 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
12 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
12 years ago

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

@georgestephanis
12 years ago

Whoops, used the longhand version in the last try.

#6 in reply to: ↑ 5 @azaozz
12 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.