# Mouse click event doesn't work on inline Frame component

**URL:** <https://forum.inductiveautomation.com/t/mouse-click-event-doesnt-work-on-inline-frame-component/64445>\
**Category:** Ignition Early Access\
**Created:** [September 24, 2022, 5:55pm UTC](https://forum.inductiveautomation.com/t/mouse-click-event-doesnt-work-on-inline-frame-component/64445 "2022-09-24T17:55:13Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![nader.chinichian](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nader.chinichian/32/9261_2.png) [@nader.chinichian](https://forum.inductiveautomation.com/u/nader.chinichian)\
**Post date:** [September 24, 2022, 5:55pm UTC](https://forum.inductiveautomation.com/t/mouse-click-event-doesnt-work-on-inline-frame-component/64445/1 "2022-09-24T17:55:13Z")

</div>

Hello, I’d like to detect the mouse x and y position when I click on the inline Frame component, so I configure a click event on the iframe and try to read event.clientX/Y value. But it seems this event doesn’t work at all.  
Is it something related to security or it is actual a bug?

---

<div class="post-metadata">

**Author:** ![justinedwards.jle](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/justinedwards.jle/32/37854_2.png) [@justinedwards.jle](https://forum.inductiveautomation.com/u/justinedwards.jle)\
**Post date:** [September 24, 2022, 6:32pm UTC](https://forum.inductiveautomation.com/t/mouse-click-event-doesnt-work-on-inline-frame-component/64445/2 "2022-09-24T18:32:02Z")

</div>

I experimented with this, and mouseover, mouseleave, and mouseenter, appear to be the only inline frame mouse event scripts that actually fire.

Edit: All three provide accurate clientX and clientY information, so I don’t understand why the others wouldn’t, unless this is a bug

Edit: I was able to get mouseout to fire as well by adding a component to the container and moving the mouse over the component. This action also yielded accurate clientX and ClientY information.

---

<div class="post-metadata">

**Author:** ![nader.chinichian](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nader.chinichian/32/9261_2.png) [@nader.chinichian](https://forum.inductiveautomation.com/u/nader.chinichian)\
**Post date:** [September 24, 2022, 6:53pm UTC](https://forum.inductiveautomation.com/t/mouse-click-event-doesnt-work-on-inline-frame-component/64445/3 "2022-09-24T18:53:38Z")

</div>

It seems to me a bug. Even mousemove doesn’t work.

---

<div class="post-metadata">

**Author:** ![justinedwards.jle](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/justinedwards.jle/32/37854_2.png) [@justinedwards.jle](https://forum.inductiveautomation.com/u/justinedwards.jle)\
**Post date:** [September 24, 2022, 6:57pm UTC](https://forum.inductiveautomation.com/t/mouse-click-event-doesnt-work-on-inline-frame-component/64445/4 "2022-09-24T18:57:08Z")

</div>

I repeated the experiment with the Pointer events, and got the same results. Only onPointerOut, onPointerEnter, and onPointerLeave actually fire. I couldn’t get the onSelect selection event to work either.

---

<div class="post-metadata">

**Author:** ![nader.chinichian](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nader.chinichian/32/9261_2.png) [@nader.chinichian](https://forum.inductiveautomation.com/u/nader.chinichian)\
**Post date:** [September 25, 2022, 6:36am UTC](https://forum.inductiveautomation.com/t/mouse-click-event-doesnt-work-on-inline-frame-component/64445/5 "2022-09-25T06:36:39Z")

</div>

I hope some one from IA team answer this.

---

<div class="post-metadata">

**Author:** ![victordcq](https://avatars.discourse-cdn.com/v4/letter/v/f6c823/32.png) [@victordcq](https://forum.inductiveautomation.com/u/victordcq)\
**Post date:** [September 26, 2022, 1:14pm UTC](https://forum.inductiveautomation.com/t/mouse-click-event-doesnt-work-on-inline-frame-component/64445/6 "2022-09-26T13:14:38Z")

</div>

iframe does not do this by default, though there should be ways to make it possible. With javascript, if the source doesnt block it.

anything with iframe is gonna be hard to use, if you dont control the page from it

---

<div class="post-metadata">

**Author:** ![nader.chinichian](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nader.chinichian/32/9261_2.png) [@nader.chinichian](https://forum.inductiveautomation.com/u/nader.chinichian)\
**Post date:** [September 27, 2022, 4:01am UTC](https://forum.inductiveautomation.com/t/mouse-click-event-doesnt-work-on-inline-frame-component/64445/7 "2022-09-27T04:01:23Z")

</div>

I have complete control of my iframe, actually, I wrote it part of it.  
And I’ve seen another problem, my iframe keypress control is blocked by perspective(or parent container). It works in the browser but when I put it in the perspective iframe, my keyboard press doesn’t work at all. Do you know how this can be fixed?

---

<div class="post-metadata">

**Author:** ![victordcq](https://avatars.discourse-cdn.com/v4/letter/v/f6c823/32.png) [@victordcq](https://forum.inductiveautomation.com/u/victordcq)\
**Post date:** [September 27, 2022, 6:53am UTC](https://forum.inductiveautomation.com/t/mouse-click-event-doesnt-work-on-inline-frame-component/64445/8 "2022-09-27T06:53:45Z")

</div>

Is your perspective running on https? some features on iframe are blocked in http.  
Idk if that is one of them or not though

---

<div class="post-metadata">

**Author:** ![nader.chinichian](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nader.chinichian/32/9261_2.png) [@nader.chinichian](https://forum.inductiveautomation.com/u/nader.chinichian)\
**Post date:** [September 27, 2022, 7:58am UTC](https://forum.inductiveautomation.com/t/mouse-click-event-doesnt-work-on-inline-frame-component/64445/9 "2022-09-27T07:58:02Z")

</div>

No it is http
