}
if (e.keyCode == 16) {
$("#linkeditor-main").addClass('selection');
-
} else if (e.keyCode == 32) {
if (!$this.mobileFirst) {
$("#linkeditor-main").addClass('grab');
});
$(window).on('keyup', function (e) {
- if (this.linkeditor.utils.isfocusOnFormItem()) {
- return true;
- }
if (e.keyCode == 16) {
$("#linkeditor-main").removeClass('selection');
} else if (e.keyCode == 32) {
}
$this.rulers.moveRuler();
+ if (this.linkeditor.utils.isfocusOnFormItem()) {
+ return true;
+ }
return false;
});
},
copySelectionToClipboard: function (cut) {
-
var selection = this.getCurrentSelection();
if (selection.length === 0) {
return;
rect.width = this.linkeditor.pw + margin * 2;
}
link.attr('fb-left', rect.x).attr('fb-top', rect.y).attr('fb-width', rect.width).attr('fb-height', rect.height);
+ this.updateSelectionData(['left', 'top', 'width', 'height']);
this.linkeditor.hasChanged();
},
r2.bottom < r1.top);
},
isfocusOnFormItem: function () {
- return $(document.activeElement).is('input,textarea,select');
+ return $(document.activeElement).is('input[type="text"],input[type="email"],input[type="number"],input[type="phone"],textarea,select');
}
};