Opened 10 years ago
Closed 10 years ago
#28549 closed defect (bug) (fixed)
The editor needs to blur when opening the media modal
Reported by: | iseulde | Owned by: | azaozz |
---|---|---|---|
Milestone: | 4.0 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Media | Keywords: | has-patch needs-testing |
Focuses: | Cc: |
Description
On an iPhone, leaving it focussed also leaves the keyboard open.
Attachments (4)
Change History (19)
#2
@
10 years ago
- Keywords needs-patch added
- Milestone changed from Awaiting Review to Future Release
#3
@
10 years ago
I encounter this every day. The keyboard gets left open or decides to fly open. I am left with a tiny little view of the modal and have to waste a tap dismissing the keyboard.
#4
@
10 years ago
- Keywords has-patch added; needs-patch removed
I've not tested this, but theoretically blurring the editor and refocussing should work.
#5
@
10 years ago
Hm, updated the patch. Should probably not assume tinymce is defined, if the media modal is supposed to work without tinymce.js loaded.
This ticket was mentioned in IRC in #wordpress-dev by rboren. View the logs.
10 years ago
#7
@
10 years ago
With .2.patch. Focus the editor. Scroll back up to add media, retaining editor focus. Tap Add Media. Keyboard remains up. The bottom of the modal is in the narrowed view port. I must dismiss the keyboard and scroll up to get a good view. I'll post screenshots of the entire flow on an iPhone 5, soon.
#10
@
10 years ago
Accidentally hit the radio to mark as duplicate. Field was empty. Milestone and Status changed.
#12
@
10 years ago
Ugh. I'll take a loo at this again later... Maybe blurring the activeElement instead works.
https://developer.mozilla.org/en-US/docs/Web/API/document.activeElement
This ticket was mentioned in IRC in #wordpress-dev by rboren. View the logs.
10 years ago
#14
@
10 years ago
- Keywords needs-testing added
- Milestone changed from Future Release to 4.0
Instead of blurring the editor body, we can quickly focus and blur an input field. Works for both editors and doesn't mess with MCE's focus/bookmark.
28549.3.patch tested in iOS7.1 and Android 4.4. Instead of appending another text field, we can select the first one, usually the title, but it shouldn't be hidden for this hack to work. Worst case scenario would be that this doesn't do anything.
Related: #27423