fix click-to-edit in popup on slider and iframe badge
This commit is contained in:
parent
d6b591e4ab
commit
adb2b1004d
|
@ -80,6 +80,7 @@
|
|||
bottom: 0;
|
||||
margin: 0;
|
||||
padding: 0 4px 0 18px;
|
||||
pointer-events: none;
|
||||
}
|
||||
.entry .onoffswitch span {
|
||||
position: absolute;
|
||||
|
|
|
@ -239,6 +239,9 @@ html[style] .entry-content {
|
|||
.entry .onoffswitch {
|
||||
padding: 0 0 0 6px;
|
||||
}
|
||||
.entry .onoffswitch input {
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.entry:nth-child(even) {
|
||||
background-color: rgba(0, 0, 0, 0.05);
|
||||
|
|
|
@ -439,6 +439,7 @@ function createStyleElement(style) {
|
|||
const sel = 'span.frame-url';
|
||||
const frameEl = $(sel, entry) || styleName.insertBefore($create(sel), styleName.lastChild);
|
||||
frameEl.title = frameUrl;
|
||||
frameEl.onmousedown = handleEvent.maybeEdit;
|
||||
}
|
||||
entry.classList.toggle('frame', Boolean(frameUrl));
|
||||
|
||||
|
@ -626,7 +627,8 @@ Object.assign(handleEvent, {
|
|||
return;
|
||||
}
|
||||
// open an editor on middleclick
|
||||
if (event.target.matches('.entry, .style-name, .style-edit-link')) {
|
||||
const el = event.target;
|
||||
if (el.matches('.entry, .style-edit-link') || el.closest('.style-name')) {
|
||||
this.onmouseup = () => $('.style-edit-link', this).click();
|
||||
this.oncontextmenu = event => event.preventDefault();
|
||||
event.preventDefault();
|
||||
|
@ -634,7 +636,7 @@ Object.assign(handleEvent, {
|
|||
}
|
||||
// prevent the popup being opened in a background tab
|
||||
// when an irrelevant link was accidentally clicked
|
||||
if (event.target.closest('a')) {
|
||||
if (el.closest('a')) {
|
||||
event.preventDefault();
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user