# wrapfig not breaking lines properly in beamer

I have a very simple situation where wrapfig is not correctly choosing line break positions correctly. Here is the MWE:

\documentclass{beamer}
\usepackage{wrapfig}
\begin{document}
\begin{frame}
\begin{wrapfigure}{R}[5pt]{0.52\textwidth}
\framebox{THIS IS MY FIGURE}
\end{wrapfigure}
This is not wrapped properly, I think.

Here is some more text.
\end{frame}
\end{document}


Here is the output:

You can see that the first line of text is ended prematurely after the word "is". How can I make sure that text will wrap at the proper point on each line?

Perhaps related: I would expect the figure to be displayed at the same height as the first row of text, not the second row.

A beamer "page" is a rather special environment and a lot of things don't work like in the normal classes. You can try to add an additional minipage, r instead of R and a changed \intextsep:

\documentclass{beamer}
\usepackage{wrapfig}

\begin{document}
\begin{frame}
\begin{minipage}{\linewidth}\intextsep=0pt
\begin{wrapfigure}{r}[5pt]{0.52\linewidth}
\framebox{THIS IS MY FIGURE}
\end{wrapfigure}
This is not wrapped properly, I think.

Here is some more text.
\end{minipage}
\end{frame}
\end{document}


But I would use columns in beamer and not wrapfig.