BIP: ? Layer: Applications Title: Address Paste Improvement Author: nopara73 <email@example.com> David Molnar <firstname.lastname@example.org> Comments-Summary: No comments yet. Comments-URI: Status: Draft Type: Standard Track Created: 2018-11-07 License: CC0-1.0
Table of Contents
End-users often copy-paste addresses. This BIP aims to facilitate the user experience regarding this process.
Some services already implemented autopaste functions, which is done as follows: the user clicks to the address box and a Bitcoin address automatically gets pasted from the clipboard. Depending on the implementation, this could be either annoying or not permissive enough if it completely replaces the possibility of manually entering a Bitcoin address.
1. The software checks the content of the clipboard when the mouse cursor enters the address box area. 2. If the clipboard is not text or its lenght is above 100 characters, then the result of the validation is false. This safety check is needed in order to avoid Bitcoin address validation on huge text blocks for example. 3. Next trim whitespaces from the beginning of the end of the clipboard content. 4. Finally Bitcoin addess validation can proceed on the trimmed text normally with the preferred validation method of the implementor.
When the mouse cursor enters the address box area, clipboard address validation is performed. If the check is successful, the appearance of the mouse cursor remains unchanged, unlike the normal text box behavior when it changes to the caret. Optionally a special cursor icon can be used, however, in order to avoid cross platform issues, the implementor may choose to go with the default mouse cursor as suggested.
Finally unfocus the address box. Note that, focused address box is traditionally indicated by blinking caret.
This indicates to the user that, if he clicks on the address box, then the address from the clipboard will be pasted. Additional clues can be also implemented, for example a tooltip saying "click to paste address from clipboard". More advanced UX interactions are also possible.
The normal text box behavior changes based on the focus. If the focus is not on the address box, then on click select all text from the address box and give the focus to the address box. In this case a tooltip or more advanced UX interactions can indicate the unorthodox behavior of the address box. If the address box holds the focus, then normal text box behavior takes place.
If the address box does not hold the focus and it is not empty, then on right click, all text should be selected and the context menu appears, indicating that, the whole text will be modified by the selected operation. In this case, the context menu should not have a "Select All" entry, since it's redundant.
While this specification is written with Desktop in mind, on mobile platforms the same behavior can be replicated by dismissing the desktop specific notes.
Work in progess implementation in Wasabi Wallet: https://github.com/zkSNACKs/WalletWasabi/pull/825
This document is licensed under the Creative Commons CC0 1.0 Universal license.