@ -18,6 +18,10 @@ export default {
const zoom = this.em.getZoomDecimal();
const el = opt.el as HTMLElement | undefined;
if (!(el instanceof HTMLElement)) {
return;
}
if (!config.showOffsets || !el || isTextNode(el) || (!config.showOffsetsSelected && state == 'Fixed')) {
editor.stopCommand(`${this.id}`, opts);
@ -191,7 +191,7 @@ export default class Selector extends Model<SelectorProps & { [key: string]: unk
* @private
*/
static escapeName(name: string) {
return `${name}`.trim().replace(/([^a-z0-9\w-\\:@\\/]+)/gi, '-');
return `${name}`.trim().replace(/([^a-z0-9\w\-\\:@\\/()\.%\+\[\]]+)/gi, '-');