MacBook goes to sleep mode when iPhone placed in one spot?

I noticed a few months ago that every time that I place my iPhone 5 on the space to the left of my MacBook track pad, it automatically shuts off all connections to my MacBook, and the laptop goes into sleep mode. I'm wondering if anyone knows why, or if this has happened to anyone else. I just find it really weird since I have no other problems with the MacBook or the iPhone.

P.S. - This did not happen with my iPhone 4

It's a magnetic switch in the laptop lol
your speakers magnet is telling it the lid is closed.

  • Why is iPhone XS Max suddenly losing sounds while in sleep mode? It occurs about 3 times a week. More frequently when the iphone is in airplane mode or the Wi-Fi is off. I have tried resetting all configurations and deleting, restarting with iTunes, updating but the issue reappears. I took it to the authorized Apple technical service in Colombia, but they didn't find any problem. Has anyone else had this problem or knows about it? What can I do?
  • My iPhone 6 won't turn on from sleep mode? I've had it for like a year and 3 months and it's doing this. Is it a bug? I can press the sleep/wake button or the home button several times but it doesn't respond. Anyone else having this issue?
  • My iPhone 4 goes into sleep mode? Okay so when I wake up in the morning I'll check my phone and have no missed callls or messages, and then all of a sudden I'll get all these text at one time and people say they have been trying to call all morning! It's making me mad and I don't know how to fix it. My alarm works and everything and they say my phone rings! Anyone know how to fix this?
  • Iphone - How to let Wi-Fi on in sleep mode? Iphone 3 has disabled the Wi-Fi in sleep mode, how can I let it stay on even when iphone in a sleep mode?