Skip to content

Commit 1cf74c1

Browse files
committed
Merge branch 'dev' of https://github.com/bernesto/neoreef-plaform-grapesjs into bernesto-dev
2 parents a7d4942 + a424617 commit 1cf74c1

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

src/commands/view/ShowOffset.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ export default {
1818
const zoom = this.em.getZoomDecimal();
1919
const el = opt.el as HTMLElement | undefined;
2020

21+
if (!(el instanceof HTMLElement)) {
22+
return;
23+
}
24+
2125
if (!config.showOffsets || !el || isTextNode(el) || (!config.showOffsetsSelected && state == 'Fixed')) {
2226
editor.stopCommand(`${this.id}`, opts);
2327
return;

src/selector_manager/model/Selector.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ export default class Selector extends Model<SelectorProps & { [key: string]: unk
191191
* @private
192192
*/
193193
static escapeName(name: string) {
194-
return `${name}`.trim().replace(/([^a-z0-9\w-\\:@\\/]+)/gi, '-');
194+
return `${name}`.trim().replace(/([^a-z0-9\w\-\\:@\\/()\.%\+\[\]]+)/gi, '-');
195195
}
196196
}
197197

0 commit comments

Comments
 (0)