Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8390357
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T18:57:46+00:00 2026-06-09T18:57:46+00:00

Currently, it seems that every time Ctrl-C is pressed within a textbox to copy

  • 0

Currently, it seems that every time Ctrl-C is pressed within a textbox to copy its content, the textbox receives an Event.CHANGE, and thus our application decides that a change was made in the text box and enables the “apply changes” button, although no changes were made, and all the user wanted was to copy the textbox contents.
The textbox component we’re using is spark.components.TextInput

On view initialization I register:

_view.hostNameTextBox.addEventListener(
    Event.CHANGE, onConnectionDat‌aChanged, false, 0, true
);

And the event listener function is:

private function onConnectionDataChanged(e:Event):void {
    _view.applyButton.enabled = true;
}

Any ideas ?

Thanks !

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T18:57:48+00:00Added an answer on June 9, 2026 at 6:57 pm

    Here’s a slight variation of @Sunil D.’s answer: use the operation property of the event to determine whether the current operation was a copy operation or another one:

    private function inputChangeHandler(event:TextOperationEvent):void {
        var operation:IOperation = event.operation;
        if (operation is CopyOperation) trace("Ctrl+C was pressed");
        if (operation is InsertTextOperation) trace("New text was inserted");
        if (operation is DeleteTextOperation) trace("Some text was deleted");
    }
    

    This approach will also fix your issue with multiple TextInputs: only one event handler required instead of many.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am currently learning Object oriented Javascript but it seems that the alert is
Basically, I currently have login/ in urls.py redirect to the django.contrib.auth.views.login and that seems
It seems that both of them could make the element move from its current
Seems like every time i go thru a required update of either the mac
The current application that I'm working on seems to recycle the application pool very
My issue is that the trigger detailed below seems to execute correctly except for
I am currently evaluating message queue systems and RabbitMq seems like a good candidate,
I am currently reading though this tutorial here And in it he seems to
Currently I am working on a SilverStripe project, and everything seems to be running
I currently have a MySQL dual master replication (A<->B) set up and everything seems

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.