This seems to have been an issue back in 2009. The old bug reports claim that the issue was resolved but it appears to still be a problem in Mousepad. All other apps seem to be working fine, including Leafpad. Bug 5717 Bug 6090 https://bugzilla.gnome.org/show_bug.cgi?id=593615
Works for me. Can you tell what version of Mousepad, and the build configuration (ex. GTK2 or 3, with or without DBus support, etc)?
Mousepad 0.4.0-2 on Arch Linux, so I think that would be GTK2 with dbus support? https://www.archlinux.org/packages/extra/x86_64/mousepad/