Problem/Motivation

The ajax submit of an editable field tries to refocus on the element that triggered the ajax but that gets replaced by the markup returned by the ajax call. The result is the page scrolling all the way up.

Steps to reproduce

Display an editable form at the bottom of a page with scroll and edit it with ajax enabled.

Disclaimer: I also use the #11 patch from #3253634: Autosave option for editable node fields?

Proposed resolution

Disable refocus for the ajax events. I don't think the refocus is a desired behaviour in the context of editablefields module but in case there is a concern we can make it configurable.

Remaining tasks

Code

CommentFileSizeAuthor
#3 3410236-disable-refocus.patch1.13 KBrodrigoaguilera
Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

rodrigoaguilera created an issue. See original summary.

rodrigoaguilera’s picture

Status: Active » Needs review
StatusFileSize
new1.13 KB

Attached as a patch for composer convenience

gilmord’s picture

Status: Needs review » Fixed

Merged in dev version

gilmord’s picture

Status: Fixed » Closed (fixed)