mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-08 19:06:15 -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);
|
||||
});
|
||||
|
||||
proxy($player, 'contextmenu', event => {
|
||||
proxy($player, 'contextmenu', (event) => {
|
||||
event.preventDefault();
|
||||
this.show = true;
|
||||
|
||||
@@ -99,8 +99,8 @@ export default class Contextmenu extends Component {
|
||||
});
|
||||
});
|
||||
|
||||
proxy($player, 'click', event => {
|
||||
if (!event.composedPath().includes($contextmenu)) {
|
||||
proxy($player, 'click', (event) => {
|
||||
if (event.composedPath && !event.composedPath().indexOf($contextmenu) > -1) {
|
||||
this.show = false;
|
||||
}
|
||||
});
|
||||
|
||||
@@ -106,7 +106,7 @@ export default function progress(option) {
|
||||
|
||||
proxy($control, 'mousemove', event => {
|
||||
setStyle($tip, 'display', 'block');
|
||||
if (event.composedPath().indexOf($highlight) > -1) {
|
||||
if (event.composedPath && event.composedPath().indexOf($highlight) > -1) {
|
||||
showHighlight(event);
|
||||
} else {
|
||||
showTime(event);
|
||||
|
||||
Reference in new issue
Block a user