@@ -232,10 +232,6 @@ bool GUIEditBox::OnEvent(const SEvent &event)
232
232
233
233
bool GUIEditBox::processKey (const SEvent &event)
234
234
{
235
- if (!m_writable) {
236
- return false ;
237
- }
238
-
239
235
if (!event.KeyInput .PressedDown )
240
236
return false ;
241
237
@@ -531,6 +527,9 @@ bool GUIEditBox::onKeyControlX(const SEvent &event, s32 &mark_begin, s32 &mark_e
531
527
// First copy to clipboard
532
528
onKeyControlC (event);
533
529
530
+ if (!m_writable)
531
+ return false ;
532
+
534
533
if (m_passwordbox || !m_operator || m_mark_begin == m_mark_end)
535
534
return false ;
536
535
@@ -556,7 +555,7 @@ bool GUIEditBox::onKeyControlX(const SEvent &event, s32 &mark_begin, s32 &mark_e
556
555
557
556
bool GUIEditBox::onKeyControlV (const SEvent &event, s32 &mark_begin, s32 &mark_end)
558
557
{
559
- if (!isEnabled ())
558
+ if (!isEnabled () || !m_writable )
560
559
return false ;
561
560
562
561
// paste from the clipboard
@@ -602,7 +601,7 @@ bool GUIEditBox::onKeyControlV(const SEvent &event, s32 &mark_begin, s32 &mark_e
602
601
603
602
bool GUIEditBox::onKeyBack (const SEvent &event, s32 &mark_begin, s32 &mark_end)
604
603
{
605
- if (!isEnabled () || Text.empty ())
604
+ if (!isEnabled () || Text.empty () || !m_writable )
606
605
return false ;
607
606
608
607
core::stringw s;
@@ -640,7 +639,7 @@ bool GUIEditBox::onKeyBack(const SEvent &event, s32 &mark_begin, s32 &mark_end)
640
639
641
640
bool GUIEditBox::onKeyDelete (const SEvent &event, s32 &mark_begin, s32 &mark_end)
642
641
{
643
- if (!isEnabled () || Text.empty ())
642
+ if (!isEnabled () || Text.empty () || !m_writable )
644
643
return false ;
645
644
646
645
core::stringw s;
0 commit comments