Skip to content
This repository was archived by the owner on Sep 5, 2024. It is now read-only.

Commit c86767f

Browse files
feloymmalerba
authored andcommitted
fix(panel): use $event.target instead of $event.srcElement for Firefox compatibility (#11234)
Closes #11035
1 parent 59a8d47 commit c86767f

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

src/components/panel/demoGroups/script.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@
7272
var template = this.menuTemplate;
7373

7474
var position = $mdPanel.newPanelPosition()
75-
.relativeTo($event.srcElement)
75+
.relativeTo($event.target)
7676
.addPanelPosition(
7777
$mdPanel.xPosition.ALIGN_START,
7878
$mdPanel.yPosition.BELOW
@@ -103,7 +103,7 @@
103103
var template = this.menuTemplate;
104104

105105
var position = $mdPanel.newPanelPosition()
106-
.relativeTo($event.srcElement)
106+
.relativeTo($event.target)
107107
.addPanelPosition(
108108
$mdPanel.xPosition.ALIGN_START,
109109
$mdPanel.yPosition.BELOW

src/components/panel/demoPanelProvider/script.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@
8585
$mdPanel.open('demoPreset', {
8686
id: 'menu_' + menu.name,
8787
position: $mdPanel.newPanelPosition()
88-
.relativeTo($event.srcElement)
88+
.relativeTo($event.target)
8989
.addPanelPosition(
9090
$mdPanel.xPosition.ALIGN_START,
9191
$mdPanel.yPosition.BELOW

src/components/panel/panel.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ angular
9797
* $mdPanel.open('demoPreset', {
9898
* id: 'menu_' + menu.name,
9999
* position: $mdPanel.newPanelPosition()
100-
* .relativeTo($event.srcElement)
100+
* .relativeTo($event.target)
101101
* .addPanelPosition(
102102
* $mdPanel.xPosition.ALIGN_START,
103103
* $mdPanel.yPosition.BELOW

0 commit comments

Comments
 (0)