Skip to content

Commit 7b78f3c

Browse files
Prevent editable label elements from losing focus
1 parent a8300f3 commit 7b78f3c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Resources/public/js/editInPlace.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,8 @@ var TranslationBundleEditInPlace = function(saveUrl) {
7676
var target = event.target || event.srcElement;
7777

7878
while (target) {
79-
if (target instanceof HTMLAnchorElement || target instanceof HTMLButtonElement) {
79+
// Disable the default behavior on some active elements
80+
if (target instanceof HTMLAnchorElement || target instanceof HTMLButtonElement || target instanceof HTMLLabelElement) {
8081
if(ContentTools.EditorApp.get().isEditing()) {
8182
// Link or button found, prevent default!
8283
event.preventDefault();

0 commit comments

Comments
 (0)