openhab / org.openhab.ui.habmin

HABmin - a graphical user interface for openHAB 2
231 stars 91 forks source link

Firefox fail: Copy item name to clipboard #152

Open SuperOok opened 8 years ago

SuperOok commented 8 years ago

There is a handy function to copy an item's name to the clipboard from the thing configuration menu.

After hovering the mouse over an item's name, a button pops out right next to the name. Clicking that button gives a green confirmation message about that the name was stored to clipboard.

Pasting to some text field works fine, when copied from Google Chrome or MS Edge. However, it does not work for Firefox (45.0.1). The green conformation is also shown for firefox, but afterwards, the clipboard is empty. Pasting does not insert the item's name.

cdjackson commented 8 years ago

What version of Firefox? I know the clipboard APIs aren’t supported on all versions, but I imagine you have a new one?

SuperOok commented 8 years ago

Firefox Version 45.0.1

cdjackson commented 8 years ago

So I also confirm here…

ViperRNMC commented 8 years ago

I have the same here with Safari 9.1 osx

aschor commented 8 years ago

here, I can not even see the button pop up

cdjackson commented 8 years ago

Please advise what browser you are using when reporting errors, and if reporting a problem that’s different to the one in the issue, it would be better to open a new issue?

aschor commented 8 years ago

You're right, I'm sorry, this was related to another bug (openhab creating "ghost" items, with no name ... hence my problems)

jeremyakers commented 6 years ago

An even easier fix to this would be to simply remove stuff like this from the CSS (I found several of these buried throughout the Habmin UI CSS files):

-ms-user-select: none;-moz-user-select: none;-webkit-user-select: none;user-select: none

If the ability to "select" text wasn't disabled globally you wouldn't need a fancy JavaScript button to copy text because you could just select it and hit CTRL-C like you do in every other UI.