diff options
| author | Mark Otto <[email protected]> | 2017-04-21 23:36:24 -0700 |
|---|---|---|
| committer | Mark Otto <[email protected]> | 2017-04-21 23:36:24 -0700 |
| commit | 5463d8436b6404f5c647fb12e0cd0eafa4abf5e0 (patch) | |
| tree | ada6f9b1f4990a182d829055ee079db9601dbf9b /docs/assets | |
| parent | 7efe4ddee499396efc40f53d1421b61fe5da328d (diff) | |
| parent | 638b97f19c4df6f51475f8088555e3eefd2b986f (diff) | |
| download | bootstrap-5463d8436b6404f5c647fb12e0cd0eafa4abf5e0.tar.xz bootstrap-5463d8436b6404f5c647fb12e0cd0eafa4abf5e0.zip | |
Merge branch 'v4-dev' into form-tweaks
Diffstat (limited to 'docs/assets')
| -rw-r--r-- | docs/assets/js/src/application.js | 11 | ||||
| -rw-r--r-- | docs/assets/scss/_clipboard-js.scss | 1 |
2 files changed, 10 insertions, 2 deletions
diff --git a/docs/assets/js/src/application.js b/docs/assets/js/src/application.js index 2b53556b1..b98c3a5ea 100644 --- a/docs/assets/js/src/application.js +++ b/docs/assets/js/src/application.js @@ -55,9 +55,16 @@ // Insert copy to clipboard button before .highlight $('.highlight').each(function () { - var btnHtml = '<div class="bd-clipboard"><span class="btn-clipboard" title="Copy to clipboard">Copy</span></div>' + var btnHtml = '<div class="bd-clipboard"><button class="btn-clipboard" title="Copy to clipboard">Copy</button></div>' $(this).before(btnHtml) - $('.btn-clipboard').tooltip() + $('.btn-clipboard') + .tooltip() + .on('mouseleave', function () { + // explicitly hide tooltip, since after clicking it remains + // focused (as it's a button), so tooltip would otherwise + // remain visible until focus is moved away + $(this).tooltip('hide') + }) }) var clipboard = new Clipboard('.btn-clipboard', { diff --git a/docs/assets/scss/_clipboard-js.scss b/docs/assets/scss/_clipboard-js.scss index cc3176a99..e27d1d4f8 100644 --- a/docs/assets/scss/_clipboard-js.scss +++ b/docs/assets/scss/_clipboard-js.scss @@ -23,6 +23,7 @@ color: #818a91; cursor: pointer; background-color: transparent; + border: 0; border-radius: .25rem; &:hover { |
