diff --git a/src/Abstract/Entity/Browser/Container/Page/Content/Markup.php b/src/Abstract/Entity/Browser/Container/Page/Content/Markup.php index 1d99513b..5b59115c 100644 --- a/src/Abstract/Entity/Browser/Container/Page/Content/Markup.php +++ b/src/Abstract/Entity/Browser/Container/Page/Content/Markup.php @@ -67,12 +67,14 @@ abstract class Markup $this->gtk->connect( 'button-press-event', - function() - { - // Markup container has focus disabled (to hide cursor position), - // solution remove selection from request entry on click this area - - // @TODO + function( + \GtkLabel $label, + \GdkEvent $event + ) { + return $this->_onButtonPressEvent( + $label, + $event + ); } ); } @@ -82,6 +84,11 @@ abstract class Markup string $href ): bool; + abstract protected function _onButtonPressEvent( + \GtkLabel $label, + \GdkEvent $event + ): bool; + abstract public function set( string $value ): void; diff --git a/src/Entity/Browser/Container/Page/Content/Gemtext.php b/src/Entity/Browser/Container/Page/Content/Gemtext.php index a757ac2f..4ed64f28 100644 --- a/src/Entity/Browser/Container/Page/Content/Gemtext.php +++ b/src/Entity/Browser/Container/Page/Content/Gemtext.php @@ -267,6 +267,14 @@ class Gemtext extends Markup ); } + protected function _onButtonPressEvent( + \GtkLabel $label, + \GdkEvent $event + ): bool + { + return false; + } + private function _wrap( string $value ): string diff --git a/src/Entity/Browser/Container/Page/Content/Plain.php b/src/Entity/Browser/Container/Page/Content/Plain.php index 8e191701..b0e2d36c 100644 --- a/src/Entity/Browser/Container/Page/Content/Plain.php +++ b/src/Entity/Browser/Container/Page/Content/Plain.php @@ -29,4 +29,12 @@ class Plain extends Markup { return true; } + + protected function _onButtonPressEvent( + \GtkLabel $label, + \GdkEvent $event + ): bool + { + return false; + } } \ No newline at end of file