To reproduce, toggle edit mode, then toggle back to view mode, then try and click a link. You can't. The universe's cruelest joke.

Comments

nod_’s picture

Title: Toggling edit/view mode doesn't work » Links don't work after toggling edit/view mode
nod_’s picture

Problem is in editingWidgets/*widget.js files, there is a preventDefault on click event that is bound but never released.

wim leers’s picture

If so, then that bug is most likely also in D8, so I'll port it over to 8.

nod_’s picture

Priority: Major » Critical
wim leers’s picture

Confirmed that this is also a bug in Drupal 8. Funny that nobody reported this yet.

nod_’s picture

Status: Active » Needs review

Nailed it.

There is a problem when the page opens with #edit but that should be solvable. I'll look into it tomorrow.

wim leers’s picture

I wonder if this is related to the lazy loading of editors.

nod_’s picture

I'd be surprised. It's all happening in app.js which is present on page load.

nod_’s picture

Comes down to a createjs issue https://github.com/bergie/create/issues/133

nod_’s picture

Status: Needs review » Fixed

Ok this one is solved but I made another more tricky bug appear, see #1895458: Duplicate data-edit-id attribute for node title.

wim leers’s picture

How did you solve this without fixing the upstream Create.js problem?

nod_’s picture

with http://drupalcode.org/project/edit.git/commitdiff/1fec4426e4c9c47c1d7990... and http://drupalcode.org/project/edit.git/commitdiff/f8310b952c495aee4f9e63...

I changed _manageDocumentFocus to be called later (app.js#l117) and did the binding in there. Unbinding is in _releaseDocumentFocusManagement.

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