[wp-trac] [WordPress Trac] #23054: Cursor position after editing media library attachment details
WordPress Trac
noreply at wordpress.org
Tue Jan 1 03:19:45 UTC 2013
#23054: Cursor position after editing media library attachment details
--------------------------+--------------------
Reporter: GeraldS | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: 3.5.1
Component: Media | Version: 3.5
Severity: normal | Resolution:
Keywords: needs-patch |
--------------------------+--------------------
Comment (by lessbloat):
It looks like the change events on [data-setting] call updateSetting()
which then saves the model, which then re-renders the view.
If we could add a click event, we could record the field that was clicked
and add the focus there after the view re-renders.
Unfortunately you can't just add a click event because the change event
fires when the focus is lost (re-rendering the view), before the click
event can fire.
23054.diff adds a 50ms delay (which is a bit of a hack) allowing the click
event to fire before the modal is saved and the view is re-rendered.
I also removed the 'change [data-setting]' event. It was breaking the
spinner/save functionality (and I can't really figure out why it's there -
hopefully someone can enlighten me).
As far as I can tell, this patch works, but it's hacky, and could very
likely be improved.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/23054#comment:4>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list