org.openhab.ui.habmin icon indicating copy to clipboard operation
org.openhab.ui.habmin copied to clipboard

Firefox fail: Copy item name to clipboard

Open SuperOok opened this issue 8 years ago • 8 comments

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.

SuperOok avatar Apr 01 '16 21:04 SuperOok

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

cdjackson avatar Apr 01 '16 21:04 cdjackson

Firefox Version 45.0.1

SuperOok avatar Apr 01 '16 21:04 SuperOok

So I also confirm here…

cdjackson avatar Apr 01 '16 22:04 cdjackson

I have the same here with Safari 9.1 osx

ViperRNMC avatar May 25 '16 09:05 ViperRNMC

here, I can not even see the button pop up

aschor avatar Jun 04 '16 15:06 aschor

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?

cdjackson avatar Jun 04 '16 15:06 cdjackson

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

aschor avatar Jun 06 '16 08:06 aschor

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.

jeremyakers avatar Sep 10 '18 07:09 jeremyakers