[2.0b3p] Strange browser behaviour while moving topic

Started by TheCoolGamer, March 23, 2008, 07:23:40 PM

Previous topic - Next topic

TheCoolGamer

How to recreate:
- move a topic.
- move a topic in the board where the previous topic was moved to.

A part of the HTML that is generated then:
<b>Move to:</b> <select name="toboard">
<optgroup label="General Category">
<option value="1" selected="selected" disabled="disabled">General Discussion</option>
<option value="5">Cool board</option>
</optgroup>
</select><br />

This small piece of code behaves differently on the different browsers.

Internet Explorer:
Default selects "General Discussion", the board the topic is currently in. Completely ignores the disabled attribute of option, which allows to move the topic to the board which it already is in when you click on submit. No errors are shown.

Firefox:
Default selects "General Discussion", the board the topic is currently in. However, though you can select it, the value of select is not posted when clicked on submit.

You will get the following error on the submit:
QuoteThe board you specified doesn't exist
In the error log also the error above, but preceding the following error:
Quotehttp://.../smfbeta/index.php?action=movetopic2;topic=16.0
8: Undefined index: toboard
File: E:/xampp/htdocs/smfbeta/Sources/MoveTopic.php
Line: 213

Opera
Ignores the selected attribute and selects the non-disabled board, so you cannot move to the current board. Which is the behaviour I would expect.


Summary: The current board had the disabled attribute set because it is the board where the topic is currently in. The current board has also the selected attribute, because it remembers the last board you moved something to, however this is strange because you don't want to move a topic to a board which it is already in. The result is an option with both the disabled and the selected attribute set, which is strange and leads to unexpected behaviour.
No custom themes or mods.

SleePy

Well I guess we shouldn't select that one if its disabled as its the current board  :P
For team reference the bug is 1833
Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

Advertisement: