Problem/Motivation

  1. Install 8.2.x with the standard profile and enable Outside In.
  2. Visit the frontpage.
  3. Click "Edit" in the toolbar to toggle editing mode.
  4. Click on the Tools block.
  5. Click on the Search block.
  6. Try to toggle off Edit mode by clicking on Editing. You can't. It's stuck and becomes weirdly grayed out:

Workaround: force-reload the page to get out of editing mode.

Proposed resolution

TBD

Remaining tasks

TBD

User interface changes

Presumably, "Editing" does not get stuck

API changes

TBD

Data model changes

Hopefully not.

Comments

xjm created an issue. See original summary.

xjm’s picture

Issue summary: View changes
xjm’s picture

Issue summary: View changes
swentel’s picture

I can confirm this. In general, toggling between edit back and forth doesn't seem to switch nicely always. Sometimes also after saving configuration of a block. Smells like browser caching bug, but not sure, but I remember pwolanin mentioning this somewhere and proposing to add a query parameter (but I can't recall anymore on IRC/twitter/issue)

GrandmaGlassesRopeMan’s picture

StatusFileSize
new535 bytes
new1.09 MB

This fixes an issue where the handler for toggling edit mode would get bound multiple times preventing you from escaping edit mode.

Edit Toggle issues

GrandmaGlassesRopeMan’s picture

Status: Active » Needs review
GrandmaGlassesRopeMan’s picture

StatusFileSize
new530 bytes
new811 bytes
GrandmaGlassesRopeMan’s picture

StatusFileSize
new548 bytes
new522 bytes

Set an appropriate key for .once().

cashwilliams’s picture

Did not code review but tested and appears to fix the problem.

cashwilliams’s picture

Status: Needs review » Reviewed & tested by the community

Well, maybe I should actually look at the patch first... Code reviewed.

swentel’s picture

yep, +1, fixes it completely. Code looks fine to me.

webchick’s picture

Status: Reviewed & tested by the community » Fixed

Committed and pushed to 8.2.x and 8.3.x. Thanks!

  • webchick committed ed9e669 on 8.2.x
    Issue #2787135 by drpal, xjm, swentel, cashwilliams: Editing mode gets "...

  • webchick committed b0331c0 on 8.3.x
    Issue #2787135 by drpal, xjm, swentel, cashwilliams: Editing mode gets "...
webchick’s picture

Issue tags: +JavaScript

Also retroactively tagging.

xjm’s picture

Awesome to see this fixed so fast; it was a pretty confusing bug.

I wonder if maybe we could add JS tests to ensure this doesn't regress?

nod_’s picture

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

tedbow’s picture

Component: outside_in.module » settings_tray.module

Changing to new settings_tray.module component. @drpal thanks for script help! :)