when selecting a resource for a course element such as the wiki element, the closing buttons for both the preview and the resource itself are both located in the upper right corner of the modal window. Even though a mouse-over shows which is which, the button is usually clicked much faster, resulting in an unpredictable outcome if the resource closing button is clicked.
Since it is not clear from the location which one to chose, the resource closing button is clicked very often. The outer button could be presumed to be the closing button for the whole selection process, and thus the inner button to be the one for the preview... which is of course wrong and results in some random page being opened, and the selection process closed.
The buttons should therefore be labeled. Just adding a "Close preview" label to the respective button should suffice