Bug 223332 - show correctly spoiler labels show/hide in forums
Summary: show correctly spoiler labels show/hide in forums
Status: RESOLVED NOT A BUG
Alias: None
Product: konqueror
Classification: Applications
Component: general (show other bugs)
Version: 4.3.2
Platform: Mandriva RPMs Linux
: NOR normal
Target Milestone: ---
Assignee: webkit-devel
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-01-18 21:21 UTC by Dimitrios Glentadakis
Modified: 2011-12-19 17:37 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
more readable test-case (840 bytes, text/html)
2011-12-19 05:52 UTC, Dawit Alemayehu
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Dimitrios Glentadakis 2010-01-18 21:21:24 UTC
Version:            (using KDE 4.3.2)
OS:                Linux
Installed from:    Mandriva RPMs

With konqueror, when we click on "show" in forums in the spoiler button, it does nt shows the hide label, it shows always the same: "show". 

The code usualy is this : 

<div style="margin:20px; margin-top:5px"><div class="quotetitle"><b>Spoiler:</b> <input type="button" value="Εμφάνιση" style="width:70px;font-size:10px;margin:0px;padding:0px;" onclick="if (this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display != '') { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = ''; this.innerText = ''; this.value = 'Hide'; } else { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.innerText = ''; this.value = 'Show'; }" /></div><div class="quotecontent"><div style="display: none;">{TEXT}</div></div></div>
Comment 1 Dimitrios Glentadakis 2011-09-02 20:35:22 UTC
I see that in other sites without the above code but may be someone else, the show/hide in spoilers is shown correctly in konqueror

I test the above code and it has still the problem, i dont know if it is a problem of konqueror or the code is wrong
Comment 2 Dawit Alemayehu 2011-12-19 05:49:14 UTC
This is true for webkit based browsers as well. You cannot simply change the value of any input button element using this.value. Perhaps a bug report needs to be opened upstream in webkit (QtWebKit) for this as well.
Comment 3 Dawit Alemayehu 2011-12-19 05:50:59 UTC
Actually this works fine in the most recent versions of khtml, v4.7.4 for me ; so the bug is only apparent when using the webkit engine.
Comment 4 Dawit Alemayehu 2011-12-19 05:52:48 UTC
Created attachment 66893 [details]
more readable test-case
Comment 5 Dawit Alemayehu 2011-12-19 08:18:00 UTC
(In reply to comment #3)
> Actually this works fine in the most recent versions of khtml, v4.7.4 for me ;
> so the bug is only apparent when using the webkit engine.

I take this back. Your test case will work fine in both khtml and webkit engines as well so long as you remove

              this.innerText = '';

from the code. Not only that, it will work correctly in other webkit based browser like the latest version of chromium as well. No clue why setting innerText to empty seems to have such effect on the input element.
Comment 6 Dimitrios Glentadakis 2011-12-19 17:37:27 UTC
Yes you have right, it is ok after removing this.