|
@@ -62,8 +62,8 @@ trait BrowserExtension
|
|
|
|
|
|
$isHidden = $this->script(
|
|
|
<<<JS
|
|
|
-var display = $('{$fullSelector}').css('display');
|
|
|
-
|
|
|
+var display = $('{$fullSelector}').css('display');
|
|
|
+
|
|
|
return display === 'none' || $('{$fullSelector}').is(':hidden');
|
|
|
JS
|
|
|
);
|
|
@@ -128,7 +128,7 @@ JS
|
|
|
'scrollToBottom' => function () {
|
|
|
$this->script(
|
|
|
<<<'JS'
|
|
|
-$(document).scrollTop($(document).height() - $(window).height());
|
|
|
+$(document).scrollTop($(document).height() - $(window).height());
|
|
|
JS
|
|
|
);
|
|
|
|
|
@@ -137,7 +137,7 @@ JS
|
|
|
'scrollToTop' => function () {
|
|
|
$this->script(
|
|
|
<<<'JS'
|
|
|
-$(document).scrollTop(0);
|
|
|
+$(document).scrollTop(0);
|
|
|
JS
|
|
|
);
|
|
|
|
|
@@ -152,7 +152,8 @@ JS
|
|
|
|
|
|
public function makeDelayBrowser($browser)
|
|
|
{
|
|
|
- return new class($browser) {
|
|
|
+ return new class($browser)
|
|
|
+ {
|
|
|
protected $browser;
|
|
|
|
|
|
protected $callbacks = [];
|