Quantcast

[ htmlunit-Bugs-1334150 ] HtmlOption.click() does not handle the onchange properly

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[ htmlunit-Bugs-1334150 ] HtmlOption.click() does not handle the onchange properly

SourceForge.net
Bugs item #1334150, was opened at 2005-10-21 13:09
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=448266&aid=1334150&group_id=47038

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: 1.7
Status: Open
Resolution: None
Priority: 5
Submitted By: Jimmy Larsson (jimmy57)
Assigned to: Nobody/Anonymous (nobody)
Summary: HtmlOption.click() does not handle the onchange properly

Initial Comment:

If you call HtmlOption.click() the corresponding
select's onchange handler is executed *but* the
resulting page from the execute is lost and the click
always return the "current" page.

The following two methods need small changes:

=========================================
    public void setSelected( final boolean selected ) {
       
getEnclosingSelectOrDie().setSelectedAttribute(this,
selected);
    }
    protected Page doClickAction(final Page
defaultPage) throws IOException {
        if (!isSelected()) {
            setSelected(true);
        }
        return defaultPage;
    }

============= The need to be changed to ========
    public Page setSelected( final boolean selected ) {
        return
getEnclosingSelectOrDie().setSelectedAttribute(this,
selected);
    }
    protected Page doClickAction(final Page
defaultPage) throws IOException {
        if (!isSelected()) {
            return setSelected(true);
        }
        return defaultPage;
    }
==========================================

This was tested with version 1.7 but I have checked the
viewcvs and it does not seem to be fixed.

/Jimmy Larsson


----------------------------------------------------------------------

You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=448266&aid=1334150&group_id=47038


-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
HtmlUnit-develop mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/htmlunit-develop
Loading...