mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-26 00:31:20 -08:00
fix composedPath
This commit is contained in:
1 parent
dd069324f9
commit
fa3d3c6758
2 files changed
+5
-5
No files matched your search
@@ -70,11 +70,11 @@ export default class Contextmenu extends Component {
|
|||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
|
|
||||||
option.contextmenu.forEach(item => {
|
option.contextmenu.forEach((item) => {
|
||||||
this.add(item);
|
this.add(item);
|
||||||
});
|
});
|
||||||
|
|
||||||
proxy($player, 'contextmenu', event => {
|
proxy($player, 'contextmenu', (event) => {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
this.show = true;
|
this.show = true;
|
||||||
|
|
||||||
@@ -99,8 +99,8 @@ export default class Contextmenu extends Component {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
proxy($player, 'click', event => {
|
proxy($player, 'click', (event) => {
|
||||||
if (!event.composedPath().includes($contextmenu)) {
|
if (event.composedPath && !event.composedPath().indexOf($contextmenu) > -1) {
|
||||||
this.show = false;
|
this.show = false;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -106,7 +106,7 @@ export default function progress(option) {
|
|||||||
|
|
||||||
proxy($control, 'mousemove', event => {
|
proxy($control, 'mousemove', event => {
|
||||||
setStyle($tip, 'display', 'block');
|
setStyle($tip, 'display', 'block');
|
||||||
if (event.composedPath().indexOf($highlight) > -1) {
|
if (event.composedPath && event.composedPath().indexOf($highlight) > -1) {
|
||||||
showHighlight(event);
|
showHighlight(event);
|
||||||
} else {
|
} else {
|
||||||
showTime(event);
|
showTime(event);
|
||||||
|
|||||||
Reference in new issue
Block a user