mirror of
https://github.com/squidfunk/mkdocs-material.git
synced 2026-07-24 06:43:50 -04:00
Fixed copy-to-clipboard re-appearing after document switch
This commit is contained in:
@@ -20,13 +20,14 @@
|
||||
* IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
import { Subject, animationFrameScheduler } from "rxjs"
|
||||
import { Subject, animationFrameScheduler, of } from "rxjs"
|
||||
import {
|
||||
delay,
|
||||
map,
|
||||
observeOn,
|
||||
switchMap,
|
||||
tap
|
||||
tap,
|
||||
withLatestFrom
|
||||
} from "rxjs/operators"
|
||||
|
||||
import { useComponent } from "components"
|
||||
@@ -65,7 +66,7 @@ export function setupDialog(
|
||||
/* Display dialog */
|
||||
dialog$
|
||||
.pipe(
|
||||
switchMap(text => useComponent("container")
|
||||
switchMap(text => of(document.body) // useComponent("container")
|
||||
.pipe(
|
||||
map(container => container.appendChild(dialog)),
|
||||
observeOn(animationFrameScheduler),
|
||||
|
||||
Reference in New Issue
Block a user